Resolved NPE caused by GameObject#getType()

Discussion in 'Client & Site Support' started by SlashnHax, Dec 28, 2014.

  1. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    2,962
    Likes Received:
    874
    Stacktrace:
    Code (Text):
    1.  
    2. java.lang.NullPointerException
    3. (04:27:33)     at a.TM.getType(rrb:38)
    4. (04:27:33)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.accepts(swb:39)
    5. (04:27:33)     at com.runemate.game.api.hybrid.queries.GameObjectQueryBuilder.accepts(swb:208)
    6. (04:27:33)     at com.runemate.game.api.hybrid.queries.QueryBuilder.results(cib:109)
    7. (04:27:33)     at com.slashnhax.tasks.AntiPattern.execute(AntiPattern.java:149)
    8. (04:27:33)     at com.slashnhax.tasks.AntiPattern.execute(AntiPattern.java:145)
    9. (04:27:33)     at com.slashnhax.scripts.HaxScript.poll(HaxScript.java:63)
    10. (04:27:33)     at com.slashnhax.scripts.HaxScript.onLoop(HaxScript.java:41)
    11. (04:27:33)     at com.runemate.game.api.script.framework.LoopingScript.run(yhb:89)
    12. (04:27:33)     at com.runemate.game.api.script.framework.AbstractScript.start(plb:197)
    13. (04:27:33)     at a.sJ.run(clb:102)
    14.  
    My code:
    Code (Text):
    1.  
    2. i = GameObjects.newQuery().visible().types(GameObject.Type.PRIMARY).results().random();
    3.  


     
  2. Best Answer:
    Post #4 by Cloud, Dec 28, 2014
  3. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,554
    Likes Received:
    922
    OSRS or RS3?
     
  4. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    2,962
    Likes Received:
    874
    RS3
     
  5. Cloud

    Joined:
    Jul 28, 2013
    Messages:
    2,554
    Likes Received:
    922
    Patched for the next build. The issue is the entity was unloaded while it was trying to get class type of the entity.
     

Share This Page

Loading...