Revert constants to numbers for SLua
complete
WolfGang Senizen
Now that the list casting work has been done, we no longer need all the "whole number" constants to be integers.
Being integers is causing issues with other methods like
ll.GetInventoryType("notecard") == INVENTROY_NOTECARD
Always evaluating to false as GetInventoryType returns a number not an integer
Other examples
ll.LinksetDataWrite("a",a") == LINKSETDATA_OK
ll.GetAttached() == ATTACH_HEAD
There are 2 alternatives
- Implement equallity checking between integers and numbers
- Make all the fucntions return integers....
I think
1.
should maybe be done anyway, but 2.
just seems like a bad ideaSo changing the constants back to numbers, now that numbers work in lists seems like the right move.
Log In
H
Harold Linden
complete
H
Harold Linden
We rolled an update earlier that should have updated all the
integer
constants to number
s, everything look okay on the beta grid?Jamesp1989 Resident
Harold Linden yea all good. i removed the typing from a script that required it before and runs fine now. forgot to report back
WolfGang Senizen
Harold Linden
+1 Seems good
Jamesp1989 Resident
yea xD thanks for posting this wolf. i was having issues getting INVENTORY_NONE to trigger and it was seeming to skip over the lines. i was informed i needed to cast as number but it felt odd that it didnt error with incorrect typing. guess i know why now
H
Harold Linden
inĀ progress
H
Harold Linden
Good call, we've got this in progress :)