An error will occour because of the double == that should be =
What if I want to continue execution leaving out the faulty line.
How do I catch the error and discharge the line without manually checking if everything is in order ?
@macflyerdk you might want to take a look at the pcall function, too. This allows you to call Lua code that may have runtime errors, and if so, handle them during execution of your program.
Thanks @Simeon. I will have look at the pcall function.
I am allways amazed how you find the time to develop Codea and at the same time answer these tiny problems the end users have Especially because I was able to find an answer myself on this one
Re Peter
@SkyTheCoder that will check if a variable exists but it will also implicitly check whether it is true or false if it is a Boolean for example, so it’s safest to always check whether it is equal to nil or not if you want to know for sure
That it is, it could be handy, especially for image processing off the camera type tasks though a quick google turned this up http://lua-users.org/wiki/BitwiseOperators which has some pure lua implementations but there’s certainly no performance benefit to them