Jump to content

Count items in bank?


Recommended Posts

Posted (edited)
if (bank.contains("Raw shrimps")) {
	shrimpAmount = bank.getItem("Raw shrimps").getAmount();
}

I am currently using this and nothing happens, how would I go about counting items in my bank? I have used a couple different methods but I haven't figured anything out yet.

Edited by Folks
Posted
18 minutes ago, Team Cape said:

What do you mean "nothing happens"? We need more context.

Also, Bank has a method getAmount(). You can just say getBank().getAmount("Raw shrimps");

Ill try that, but when i said nothing happens, its like the code wasnt even there, i had logs outside and inside the if state to check the value but nothing came out from the log.

Posted
7 hours ago, Folks said:

Ill try that, but when i said nothing happens, its like the code wasnt even there, i had logs outside and inside the if state to check the value but nothing came out from the log.

Make sure you hit refresh in the scripts tab of the client after you recompile. If you did that try restarting the client.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...