ERROR: Invalid number argument provided. Attempt to set property x to NaN

Does anyone have an idea what this error is about:

ERROR: Invalid number argument provided. Attempt to set property x to NaN

It appeared after I changed a value I’m multiplying some other values with and using this result as a position in a transition.to action as x goal position. Is the resulted number to small maybe? What does “NaN” mean?

share the piece of code please.

be sure to put a number

x=results\_Of\_Multiply(a,b) --\> local x=tonumber(x) transition.to(obj,{time=100,x=x})

 

NaN means “Not a Number”. Something in your calculation resulted in something that’s not a number.

I would print out the values you are multiplying. It would also help to use the type() function to find out what type of variable Lua thinks each operand is.

Rob

share the piece of code please.

be sure to put a number

x=results\_Of\_Multiply(a,b) --\> local x=tonumber(x) transition.to(obj,{time=100,x=x})

 

NaN means “Not a Number”. Something in your calculation resulted in something that’s not a number.

I would print out the values you are multiplying. It would also help to use the type() function to find out what type of variable Lua thinks each operand is.

Rob