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 NPE caused by GameObject#getType()

Joined
Dec 10, 2014
Messages
3,255
Stacktrace:
Code:
java.lang.NullPointerException
(04:27:33)     at a.TM.getType(rrb:38)
(04:27:33)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.accepts(swb:39)
(04:27:33)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.accepts(swb:208)
(04:27:33)     at com.runemate.game.api.hybrid.queries.QueryBuilder.results(cib:109)
(04:27:33)     at com.slashnhax.tasks.AntiPattern.execute(AntiPattern.java:149)
(04:27:33)     at com.slashnhax.tasks.AntiPattern.execute(AntiPattern.java:145)
(04:27:33)     at com.slashnhax.scripts.HaxScript.poll(HaxScript.java:63)
(04:27:33)     at com.slashnhax.scripts.HaxScript.onLoop(HaxScript.java:41)
(04:27:33)     at com.runemate.game.api.script.framework.LoopingScript.run(yhb:89)
(04:27:33)     at com.runemate.game.api.script.framework.AbstractScript.start(plb:197)
(04:27:33)     at a.sJ.run(clb:102)

My code:
Code:
i = GameObjects.newQuery().visible().types(GameObject.Type.PRIMARY).results().random();
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Patched for the next build. The issue is the entity was unloaded while it was trying to get class type of the entity.
 
Top