Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Very new to coding

Featured Replies

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.

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");

 

b48d48b2e63e2590771bdb35436d450f.png

Edited by ProjectPact

  • 3 weeks later...
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 ?

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.