September 26, 20178 yr 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 September 26, 20178 yr by Folks
September 26, 20178 yr What do you mean "nothing happens"? We need more context. Also, Bank has a method getAmount(). You can just say getBank().getAmount("Raw shrimps");
September 26, 20178 yr Author 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.
September 26, 20178 yr 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.
September 26, 20178 yr 21 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. Maybe an exception was being thrown inside the if statement?
Create an account or sign in to comment