Idcrytoo Posted December 29, 2018 Posted December 29, 2018 Hey guys, just need help. Currently working on a script learning pretty well. Started trying to make my own scripts a few days ago and I'm currently stuck. I'm trying to get the amount of gold in my inventory and set it to a name and use that value later in the script but it keeps saying error. Item originalGold = getInventory().getAmount("Coins"); //SCRIPT GATHERING HOW MUCH GOLD IS IN INVENTORY I have this on start. It keeps saying that I'm missing required API but it's already imported on top with color so I know it imported. P.S. I'm setting it up like in the OSBOT tutorial videos by chris. Using his NPC example but this time for gold. Sorry if I sound stupid it's because I am.
ProjectPact Posted December 29, 2018 Posted December 29, 2018 (edited) It's super tiny to read, but it looks like you are referring to an Item as a value. How to fix: long originalGold = getInventory().getAmount("Coins"); Edited December 29, 2018 by ProjectPact 1
DeckardCain Posted January 20, 2019 Posted January 20, 2019 Quote Sorry if I sound stupid it's because I am. Incorrect. You're not stupid, you're simply new. We've all been there. Always try to provide a screenshot of the log / compile window as well as the sections of code it suspects are incorrect. This helps us understand whats going on a lot faster 1