I’m getting attempt to compare string and number
error in if myTextButton.Text <= myTable.Number
.
I just want to understand why sometimes I can compare string to numbers without conversion and sometimes not… (I know I can use tostring()
or tonunber()
)
For example:
> n=1
> t="1"
> print(n==t)
false
or
print( 5 * "5" ) --> 25
no errors…
But:
if myTextButton.Text <= myTable.Number
is giving that error…
What’s the logic for that?