1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,600
    Likes Received:
    990
    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. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    It could return a Player
     
  3. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,600
    Likes Received:
    990
    Yeah cloud just told me that :p Derp. Switched it to Actor so it should be all good now
     

Share This Page

Loading...