is it possible to test if an array key is nil?
I tried the following code in an online lua playground and in defold and got different results.
x = {}
if x[1] == nil then
print("key value is nil, running alternate script")
end
playground returns nil and prints the message.
defold simply returns an error and doesn’t return nil
I believe there’s next() but i believe that only works in a loop and is unnecessary when working with approximate values as we are in this example.
Thanks for the help and or suggestions.