Lua Updates + Floating Point Values

Post in this forum if you found any bugs with server functionality.

Moderator: Team Members

Forum rules
READ THE STICKY ON PROPER BUG SUBMISSION FORMAT BEFORE POSTING.
Post Reply
tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Lua Updates + Floating Point Values

Post by tyrbo » Thu Nov 30, 2017 11:39 am

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.

User avatar
Ememjr
Team Member
Posts: 975
Joined: Wed Mar 15, 2017 9:41 am
EQ2Emu Server: Perseverance

Re: Lua Updates + Floating Point Values

Post by Ememjr » Thu Nov 30, 2017 11:42 am

that would make sense since integer should not handle floatingpoint anyways should it

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Lua Updates + Floating Point Values

Post by tyrbo » Thu Nov 30, 2017 11:44 am

Probably, it had just worked differently (probably in an undocumented/unintended way) previously, and now they changed it in Lua 5.3 (?).

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests