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.

Nullpointeracception Using New Skills Hook

Featured Replies

returns a nullpointer on the line where I'm calling it.

 

    	 try {            sAttackEXP = (int)(skills.getExperience(Skill.ATTACK));            sStrengthEXP =  (int)(skills.getExperience(Skill.STRENGTH));            sDefenceEXP =  (int)(skills.getExperience(Skill.DEFENCE));            log("Skill Starting is A:" +sAttackEXP + " B: " +sStrengthEXP+ " C: " +sDefenceEXP);        } catch(NullPointerException e) {            e.printStackTrace();        }

 

Yes, skills is initiated

 

 

Skills skills = new Skills(bot, client);

 

 

 java.lang.NullPointerException    at org.osbot.script.rs2.skill.Skills.getExperience(ic:95)    at XenoFightCaves.onStart(XenoFightCaves.java:93)    at org.osbot.engine.Bot.startScript(ok:25)    at org.osbot.script.engine.ScriptManager.startScript(dd:153)    at org.osbot.r.run(eh:192)    at java.lang.Thread.run(Thread.java:722)

 

 

Ideas?

Edited by XenoTools

whats an acception

 

are you going to post the stack trace

 

do you even want help

  • Author

whats an acception

 

are you going to post the stack trace

 

do you even want help

 

An Acception is a Typo that I cannot correct because it will not allow me to edit my Thread Title.

 

If you want what I have to work with, here it is.

 

 

java.lang.NullPointerException    at org.osbot.script.rs2.skill.Skills.getExperience(ic:95)    at XenoFightCaves.onStart(XenoFightCaves.java:93)    at org.osbot.engine.Bot.startScript(ok:25)    at org.osbot.script.engine.ScriptManager.startScript(dd:153)    at org.osbot.r.run(eh:192)    at java.lang.Thread.run(Thread.java:722)

 

 

here,

 

 

   	 try {            sAttackEXP = (int)(skills.getExperience(Skill.ATTACK));            sStrengthEXP =  (int)(skills.getExperience(Skill.STRENGTH));            sDefenceEXP =  (int)(skills.getExperience(Skill.DEFENCE));            log("Skill Starting is A:" +sAttackEXP + " B: " +sStrengthEXP+ " C: " +sDefenceEXP);        } catch(NullPointerException e) {            e.printStackTrace();        }

 

 

So, I don't have much to work with either.[/code]

Edited by XenoTools

  • Author

Looks like a bot error rather than your code and just so you know, you don't have to cast the return values, it's already returned as an integer.

 

http://osbot.org/api/org/osbot/script/rs2/skill/Skills.html#getCurrentLevel(org.osbot.script.rs2.skill.Skill)

 

Yeah, I wasn't originally, but with OSBot I've noticed that you can do some STRANGE SHIT as-well as have STRANGE SHIT be the issue, lol. Hopefully that had to do with groovy and not the API itself, but you never know. I just did it to see if there was a possibility of it fixing the error.

Guest
This topic is now closed to further replies.

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.