Undeclared Variable Simulator VS Device

This happens when a variable value is NOT assigned. So done = nil. I mean, I realize that i should not refer to nil variables, but it is annoying since it works in the simulator but produces an error on the device!

ERROR ON DEVICE BUT NOT SIMULATOR [lua]if done == true then

end[/lua] NO ERRORS [lua]if done then
if done == true then

end
end[/lua]
Thanks! [import]uid: 59735 topic_id: 23385 reply_id: 323385[/import]