Open EPuncker opened 2 years ago
The problem is that now we must handle numbers carefully on the lua side, in this case we are setting a negative number and getNumber expects a number of the same type.
sell = -1
I guess now we should use the number 0? I'm not sure if 0 is a valid index for lua references though, or it would also work to change the type of number we expect to int instead of uint
https://github.com/otland/forgottenserver/blob/d87a01521243a4e9a94f4320d58085b1edc1337f/data/npc/lib/npcsystem/modules.lua#L819
number 0 works fine, tested https://github.com/Zbizu/forgottenserver/commit/095a8ffb5e3e132ecef33e6a991c582f9f21d20a
there's no reason to have type different than u32 in these fields anyway
number 0 works fine, tested Zbizu@095a8ff
there's no reason to have type different than u32 in these fields anyway
What if you want to sell item for free? Thus setting 0. and u64 is perfectly fine for money prices.
Before creating an issue, please ensure:
Steps to reproduce (include any configuration/script required to reproduce)
Expected behaviour
no error
Actual behaviour