Michal Ziak Posted June 13, 2019 Share Posted June 13, 2019 Hi guys, I am doing some questing scripts and I am stuck on one thing. inventory.getAmount sometimes returns 0 and inventory.contains("Ïtem") sometimes returns false, even if have that item in inventory, which will end with infinite shearing of sheeps, picking up buckets, etc. What are the conditions to actually show the proper amount? Do I need to have my inventory opened while doing this checks? Thank you for answer Quote Link to comment Share on other sites More sharing options...
Tom Posted June 13, 2019 Share Posted June 13, 2019 There shouldn't be anything wrong with the checks themselves, might be a dumb question but are you 100% spelling the item name correctly? Quote Link to comment Share on other sites More sharing options...
Neanel Posted June 13, 2019 Share Posted June 13, 2019 It should work fine, as Tom said above make sure you spell the item correctly (case sensitive). If it still doesn't work, post the actual code perhaps something else is wrong. Quote Link to comment Share on other sites More sharing options...
Czar Posted June 13, 2019 Share Posted June 13, 2019 You need to make sure the inventory is open when doing any operations, much more stable than without inventory being open, especially after log outs/breaks/mirror client in general Quote Link to comment Share on other sites More sharing options...
Antonio Kala Posted June 13, 2019 Share Posted June 13, 2019 make sure you open the inventory first Quote Link to comment Share on other sites More sharing options...
Michal Ziak Posted June 18, 2019 Author Share Posted June 18, 2019 Actually issue was, that i needed to open inventory first This topic can be closed I guess. Thank you. Quote Link to comment Share on other sites More sharing options...