Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Nullpointer in GameObjectQueryBuilder#names()

Primate
Joined
Oct 30, 2014
Messages
3,458
Code:
(05:17:50) java.lang.NullPointerException
(05:17:50)     at com.runemate.game.api.hybrid.util.Regex.getPatternForExactString(xpb:169)
(05:17:50)     at com.runemate.game.api.hybrid.util.Regex.getPatternsForExactStrings(xpb:239)
(05:17:50)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.names(xvb:179)
(05:17:50)     at productions.celestial.citadel.tasks.TeleportToCurrent.validate(TeleportToCurrent.java:25)
(05:17:50)     at com.runemate.game.api.script.framework.task.TaskScript.onLoop(qxb:232)
(05:17:50)     at com.runemate.game.api.script.framework.LoopingScript.run(htb:239)
(05:17:50)     at com.runemate.game.api.script.framework.AbstractScript.start(jnb:156)
(05:17:50)     at app.bj.run(ukb:214)

My code:
Code:
            final GameObjectQueryBuilder builder = GameObjects.newQuery().names(resource.getName()).actions(resource.getAction());

resource#getName() is "Root".
 
Primate
Joined
Oct 30, 2014
Messages
3,458
The enum instance could be null
Code:
        if (resource != null) {
 
Then resource.getName() should throw a NPE though?

Maybe debug resource.getName() just to be absolutely sure what it's returning.
I'll do that. It seems to happen when logged out or when loading into a new world a lot btw (entering a clan citadel puts you in a different world).
 
I was indeed passing null because I'm retarded.
 
Top