Fir3element/3777

Issue with createitem.lua

Opened this issue · 1 comments

There is some issue with createitem.lua that made my server crash and shutdown. I'm not really sure what's the matter, but by disabling each parts of the script I came to a conclusion that it is one of those:
doCreateItemEx(id, amount)
doPlayerAddItemEx(cid, item, true)

This made the server crash if you typed /i itemName two times.
I was doing it with my custom item, but same happened with other items. I guess those functions are bugged, because doPlayerAddItem(cid, id, amount, false) is working.

This github is pretty dead, but hopefully someone still reads that. At the moment, this issue is not bothering me, since as I said, there is a way around, but I guess I will be looking into that in the future and potentially come back here with the solution.

Just checked and new TFS doesn't use this method of creating item on /i, they use local result = player:addItem(itemType:getId(), count), so that's the same way I've just used that is working without crash.