How can I check if variable isnt nil ?
Here is my code: http://pastebin.com/07szXe0i
I'm saying about Tank() function.
I tried if variable == nil but it doesnt work
The second problem is terminating program
When i am in tank mode ($$tank show) and i terminate program, i cant edit it. It says: edit:60: attempt to call nil
I have to reboot PC then.
EDIT: I need checking var because i saw, when tank is empty, his liquid amount is nil, so table[1].amount is nil and program crashes
Edited by OczkoSX, 01 May 2014 - 10:42 AM.











