Inventory to chest event (Red51)
-
- English
- yahwho
- Thread is marked as Resolved.
-
-
No why? there shouldn't be any change, there was a correction only because the .getItem method and the .getExchangeItem were written inverse and they got fixed to return the correct item.
-
Hmm. Well. . . on Medieval Realms you can sell items such as gold ingots to the treasury and iron rods etc to the blacksmith.
This works via players transferring items from their inventory into large crates within the shops.
This was all working flawlessly before. We had a server crash a few days ago, and I've just discovered that when players do this action now, the server crashes!
-
I've only just this second found it out, defiantly a null pointer exception that was not there before. I'll post more info as I find it. . .
-
you probably need to switch the .getitem with the .getExchangeItem methods as they were swapped in the last update so if you are using them then there will definitely be a null pointed exception
-
Hmm well the bit of code I've just tested that's throwing a null pointer is:
So are you saying all my getExchangeItem calls need to be changed to getItem? I wonder because you make it sound like its the other way round?
-
yes all your .getItem need to become .getExchangeItem and all your .getExchangeItem need to become .getItem
in the old bug version the .getItem returned the exchanged item and the .getExchangeItem returned the item you placed. This was corrected in the last update
-
Ah that makes sense. Thanks Mino! Saved me a headache there
(panic over)
Also Mino, sorry, I should have read your first reply properly!
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!