Resolved java.lang.ClassCastException: app.MP cannot be cast to com.runemate.game.api.hybrid.entities.Npc

Discussion in 'Client & Site Support' started by Aidden, Jul 29, 2015.

  1. Code (Text):
    1.  
    2. java.lang.ClassCastException: app.MP cannot be cast to com.runemate.game.api.hybrid.entities.Npc
    3.  at com.runemate.maxiscripts.task.monkkiller.tasks.Attack.validate(Attack.java:82)
    4.  at com.runemate.game.api.script.framework.task.TaskScript.onLoop(fsb:26)
    5.  at com.runemate.game.api.script.framework.LoopingScript.run(lub:161)
    6.  at com.runemate.game.api.script.framework.AbstractScript.start(jxb:216)
    7.  at app.RK.run(tvb:44)
    8. 1.1.1 - OSRS
    Code (Text):
    1.  
    2. monk = (Npc) player.getTarget()
    3.  
    @Cloud Most likely my fault but isn't getTarget() ALWAYS going to return either an Npc or null?
     
  2. It could return a Player
     
  3. Yeah cloud just told me that :p Derp. Switched it to Actor so it should be all good now
     

Share This Page

Loading...