Jump to content

Count items in bank?


Folks

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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