Page 1 of 1

Lua Updates + Floating Point Values

Posted: Thu Nov 30, 2017 11:39 am
by tyrbo
It looks like lua_tointegerx previously handled floating point numbers differently. Now it seems to return 0 when passed a floating point number.

I changed this on my end by using lua_tonumber rather than lua_tointeger in the (one) place I've seen the issue so far on Stitch (AddSpellBonus), but I'm not sure if there's other issues that were caused by the change.

Just a heads up.

Re: Lua Updates + Floating Point Values

Posted: Thu Nov 30, 2017 11:42 am
by Ememjr
that would make sense since integer should not handle floatingpoint anyways should it

Re: Lua Updates + Floating Point Values

Posted: Thu Nov 30, 2017 11:44 am
by tyrbo
Probably, it had just worked differently (probably in an undocumented/unintended way) previously, and now they changed it in Lua 5.3 (?).