Hi, I’m trying to compare 2 simple integers.
http://docs.coronalabs.com/guide/start/introLua/index.html#relational-operators says
“Numbers and strings are compared in the usual way.” - Sounds simple eh?
I try the following where both numValue and are set to integer 1 :
print(numValue) print(localExhibitorRevision) print(type(localExhibitorRevision)) print(type(numValue)) if numValue == localExhibitionRevision then print("Bingo") else print("Nada") end
Terminal tells me
1
1
number
number
Nada
so I get confirmation that my values have not changed and they are both the same type but for some reason I don’t get the Bingo but I get Nada which tells me for some reason Corona thinks 1 is not equal to 1.
I then change my relational operator to > to test if one variable is greater than the other one using :
if numValue > localExhibitionRevision then
and run the same code. I get the following in the terminal :
1
1
number
number
Runtime error
…0_979kb60vx5cvv80000gn/T/TemporaryItems/158/main.lua:234: attempt to compare nil with number
stack traceback:
I’m about to go crazy. Anyone have an idea what I might be doing wrong? Thank you so much for your help.

