June 13, 20196 yr 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
June 13, 20196 yr There shouldn't be anything wrong with the checks themselves, might be a dumb question but are you 100% spelling the item name correctly?
June 13, 20196 yr 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.
June 13, 20196 yr 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
June 18, 20196 yr Author Actually issue was, that i needed to open inventory first This topic can be closed I guess. Thank you.
Create an account or sign in to comment