Resolved Quest Error

Discussion in 'Quest / Script Help' started by Kirstiana, Sep 13, 2013.

  1. Kirstiana Starting Out

    Want I want is for the player to enter the area to trigger the messages, after the messages, they must go to a gate that triggers another message and completes the quest. Once I get this to even work, eventually I want to add a teleport event after they walk to the gate, but at this point I can't even get simple messages to work. Here's what I got:

    http://pastebin.com/nBP9HcuG

    And here are my errors:

    In-Game: "A serious error has occured and the quest has been stopped."

    In Console: 12.09 21:05:24 [Server] SEVERE [Common|V1Quest] Tried to start already running task 1 for Kirstiana/Stonewall!

    Help :( I've been struggling with this for two days now and completely frustrated. I don't want to use another plugin as this does EXACTLY what I need it for.
  2. robxu9 Head Developer

    Hmmm... let me debug it and see.
  3. Kirstiana Starting Out

  4. robxu9 Head Developer

    I just got that as well... Oh no. :/

    As a workaround, see if you can use AreaEvent instead of SingleAreaEvent.
    I'll have to look into this further.
  5. Kirstiana Starting Out

    Alrighty! Let me know if ya got anything :D
  6. robxu9 Head Developer

  7. Kirstiana Starting Out

    Hey thanks for this! The messages now work, but now there's the TeleportEvent problem:

    Code:
    Name:Stonewall
    Description:Defend the Castle!
    Repeatable:true
    Event:1:MessageEvent:30:You hear several screams in the distance. You look over to see a Knight waving at you.
    Event:2:SingleAreaEvent:500:1:375:64:-378:2
    Event:3:MessageEvent:1000:Injured Knight: Hey you there! The castle is under attack, please help! I am injured, but take what you need from me!
    Event:4:MessageEvent:7000:Injured Knight: Once you have gotten what you need, please head through the gate!
    Event:5:SingleAreaEvent:500:2:380:64:-380:2
    Event:6:MessageEvent:10:The Gate opens and you run through.
    Event:7:T:TeleportEvent:500:1:384:64:-381
    Event:8:CompleteQuestEvent:60
    Event:9:QuestEvent:30:-1
    Target:1:AreaTarget:380:64:-380:2
    Task:0:1,2
    Task:1:3,4,5
    Task:2:6,7,8,9
    
    Here is the Error when I try to /quest reload Stonewall:

    [Server] WARNING [Common|V1Handler] Unable to handle Target at Stonewall.quest:13

    And here is the error I get when I try to enter the targeted area anyways:

    Code:
    [Server] WARNING [Common|V2Task] Unknown event QuestEvent requested in event number 9 for quest Kirstiana/Stonewall; Ignoring.
    14.09 12:44:25 [Server] SEVERE at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
    14.09 12:44:25 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
    14.09 12:44:25 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
    14.09 12:44:25 [Server] SEVERE at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
    14.09 12:44:25 [Server] SEVERE at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:522)
    14.09 12:44:25 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    14.09 12:44:25 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R2.scheduler.CraftTask.run(CraftTask.java:53)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent.complete(QuestEvent.java:169)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.completeEvent(V2Task.java:227)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.completeTask(V1Quest.java:254)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.startTask(V1Quest.java:137)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.start(V2Task.java:122)
    14.09 12:44:25 [Server] SEVERE at com.theminequest.common.quest.v1.V1EventManager.constructEvent(V1EventManager.java:117)
    14.09 12:44:25 [Server] SEVERE at java.lang.reflect.Constructor.newInstance(Unknown Source)
    14.09 12:44:25 [Server] SEVERE at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
    14.09 12:44:25 [Server] SEVERE java.lang.InstantiationException
    14.09 12:44:25 [Server] SEVERE [Common|V1EventManager] In retrieving event QuestEvent from Kirstiana/Stonewall:
    14.09 12:44:25 [Server] WARNING [Common|V2Task] Unknown event TeleportEvent requested in event number 7 for quest Kirstiana/Stonewall; Ignoring
  8. Kirstiana Starting Out

    For anyone viewing this thread with the same issues:

    1. The messages error was fixed, thanks to RobXu :)
    2. I didn't realize TeleporterEvents hadn't been implemented in Milestone 3 yet :)..... but I anxiously await it's update :D Yay for MineQuest!
  9. robxu9 Head Developer


    Ok, so I've pushed an untested version of TeleportEvent and stuff...

    Your quest file should be like this:
    Code:
    Name:Stonewall
    Description:Defend the Castle!
    Repeatable:true
    Event:1:MessageEvent:30:You hear several screams in the distance. You look over to see a Knight waving at you.
    Event:2:SingleAreaEvent:500:1:375:64:-378:2
    Event:3:MessageEvent:1000:Injured Knight: Hey you there! The castle is under attack, please help! I am injured, but take what you need from me!
    Event:4:MessageEvent:7000:Injured Knight: Once you have gotten what you need, please head through the gate!
    Event:5:SingleAreaEvent:500:2:380:64:-380:2
    Event:6:MessageEvent:10:The Gate opens and you run through.
    TargetEvent:7:TeleportEvent:500:1:384:64:-381
    Event:8:CompleteQuestEvent:60
    Event:9:QuestEvent:30:-1
    Target:1:AreaTarget:380:64:-380:2
    Task:0:1,2
    Task:1:3,4,5
    Task:2:6,7,8,9
    The only difference is instead of Event:7:T:TeleportEvent, it's now TargetEvent:7:TeleportEvent. I might keep the old way for backwards compatibility, but we'll have to see.

    build: http://jci.lincomlinux.org/view/MineQuest/job/MQBundle3/40/
  10. Kirstiana Starting Out

    Thanks for updating! :D

    Here are the following errors I get and what triggered them while using the above quest you gave me:

    I got this one when reloading the quest by accident when not using the proper casing (stonewall versus Stonewall) with /quest reload stonewall:

    Code:
    07.10 14:14:26 [Server] SEVERE ... 21 more
    07.10 14:14:26 [Server] SEVERE at com.theminequest.bukkit.frontend.cmd.QuestCommandFrontend.reload(QuestCommandFrontend.java:78)
    07.10 14:14:26 [Server] SEVERE at com.theminequest.bukkit.quest.BukkitQuestManager.reloadQuest(BukkitQuestManager.java:145)
    07.10 14:14:26 [Server] SEVERE Caused by: java.lang.IllegalArgumentException: No such file stonewall and not previously loaded!
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:592)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.DedicatedServerConnection.b(SourceFile:30)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.ServerConnection.b(SourceFile:37)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.PlayerConnection.e(PlayerConnection.java:116)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.NetworkManager.b(NetworkManager.java:296)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.Packet3Chat.handle(SourceFile:49)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.PlayerConnection.a(PlayerConnection.java:834)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.PlayerConnection.chat(PlayerConnection.java:877)
    07.10 14:14:26 [Server] SEVERE at net.minecraft.server.v1_6_R3.PlayerConnection.handleCommand(PlayerConnection.java:959)
    07.10 14:14:26 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R3.CraftServer.dispatchCommand(CraftServer.java:523)
    07.10 14:14:26 [Server] SEVERE at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192)
    07.10 14:14:26 [Server] SEVERE at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    07.10 14:14:26 [Server] SEVERE at com.theminequest.bukkit.frontend.cmd.CommandFrontend.onCommand(CommandFrontend.java:111)
    07.10 14:14:26 [Server] SEVERE at java.lang.reflect.Method.invoke(Unknown Source)
    07.10 14:14:26 [Server] SEVERE at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    07.10 14:14:26 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    07.10 14:14:26 [Server] SEVERE at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    07.10 14:14:26 [Server] SEVERE java.lang.reflect.InvocationTargetException
    07.10 14:14:26 [Server] INFO [Quest] Reloading stonewall...
    
  11. Kirstiana Starting Out

    I got this one when accepting the quest via left click of the sign:

    Code:
    07.10 14:15:01 [Server] INFO [Quest] Loaded Stonewall from /plugins/MineQuest/quests/Stonewall.quest.
    07.10 14:15:01 [Server] INFO [Quest] Retrieving target 1 for detail Stonewall failed!
    07.10 14:15:01 [Server] INFO [Quest] Reloading Stonewall...
    And lastly, I got this one when I attempted to enter the targeted area:
    Code:
    07.10 14:21:30 [Server] INFO at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    07.10 14:21:30 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    07.10 14:21:30 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    07.10 14:21:30 [Server] INFO at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    07.10 14:21:30 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524)
    07.10 14:21:30 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    07.10 14:21:30 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53)
    07.10 14:21:30 [Server] INFO at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    07.10 14:21:30 [Server] INFO at com.theminequest.api.quest.event.TargetedQuestEvent.action(TargetedQuestEvent.java:54)
    07.10 14:21:30 [Server] INFO java.lang.RuntimeException: No such target ID!
    07.10 14:21:30 [Server] WARNING Task #9046 for MineQuest v3.0.20 generated an exception
    07.10 14:21:30 [Server] WARNING [Common|V2Task] Unknown event QuestEvent requested in event number 9 for quest Kirstiana/Stonewall; Ignoring.
    07.10 14:21:30 [Server] SEVERE at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    07.10 14:21:30 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    07.10 14:21:30 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    07.10 14:21:30 [Server] SEVERE at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    07.10 14:21:30 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524)
    07.10 14:21:30 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    07.10 14:21:30 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent.complete(QuestEvent.java:169)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.completeEvent(V2Task.java:245)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.completeTask(V1Quest.java:254)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.startTask(V1Quest.java:137)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.start(V2Task.java:132)
    07.10 14:21:30 [Server] SEVERE at com.theminequest.common.quest.v1.V1EventManager.constructEvent(V1EventManager.java:117)
    07.10 14:21:30 [Server] SEVERE at java.lang.reflect.Constructor.newInstance(Unknown Source)
    07.10 14:21:30 [Server] SEVERE at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
    07.10 14:21:30 [Server] SEVERE java.lang.InstantiationException
    07.10 14:21:30 [Server] SEVERE [Common|V1EventManager] In retrieving event QuestEvent from Kirstiana/Stonewall:
    
  12. robxu9 Head Developer

    Yup, that's intentional. If you're on Mac or Linux, casing matters, so I have to enforce it as well regardless of platform.

    Whoops, well... it was an untested build. I'll fix it ASAP.

    Yup, that's because of the error above with it failing to retrieve the target.
    The QuestEvent error you can ignore (I still don't know why it's complaining but I'll take a look at it).

    I've got a major midterm tomorrow night, so I'll be studying for that; but afterwards I'll get to fixing it right away. I have a feeling I know why it's erroring...
  13. Kirstiana Starting Out

    Awesome, I'm approaching my midterms as well. Thanks for keeping up!! :D
  14. robxu9 Head Developer

  15. Kirstiana Starting Out

    I'm still getting the target failed error. :(

    Code:
    07.10 15:40:34 [Server] SEVERE Unhandled Exception occurred. Log at /plugins/MineQuest/.reports/1381185634927.log.
     
    07.10 15:40:34 [Server] INFO [Quest] Loaded Stonewall from /plugins/MineQuest/quests/Stonewall.quest.
    07.10 15:40:34 [Server] INFO [Quest] Retrieving target 1 for detail Stonewall failed!
    07.10 15:40:34 [Server] INFO [Quest] Reload Triggered. Starting reload...
    Code:
    07.10 15:56:59 [Server] INFO at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    07.10 15:56:59 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    07.10 15:56:59 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    07.10 15:56:59 [Server] INFO at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    07.10 15:56:59 [Server] INFO at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524)
    07.10 15:56:59 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    07.10 15:56:59 [Server] INFO at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53)
    07.10 15:56:59 [Server] INFO at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    07.10 15:56:59 [Server] INFO at com.theminequest.api.quest.event.TargetedQuestEvent.action(TargetedQuestEvent.java:54)
    07.10 15:56:59 [Server] INFO java.lang.RuntimeException: No such target ID!
    07.10 15:56:59 [Server] WARNING Task #8363 for MineQuest v3.0.22 generated an exception
    07.10 15:56:59 [Server] WARNING [Common|V2Task] Unknown event QuestEvent requested in event number 9 for quest Kirstiana/Stonewall; Ignoring.
    07.10 15:56:59 [Server] SEVERE at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    07.10 15:56:59 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421)
    07.10 15:56:59 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488)
    07.10 15:56:59 [Server] SEVERE at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227)
    07.10 15:56:59 [Server] SEVERE at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:524)
    07.10 15:56:59 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
    07.10 15:56:59 [Server] SEVERE at org.bukkit.craftbukkit.v1_6_R3.scheduler.CraftTask.run(CraftTask.java:53)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent$1.run(QuestEvent.java:83)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.api.quest.event.QuestEvent.complete(QuestEvent.java:169)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.completeEvent(V2Task.java:245)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.completeTask(V1Quest.java:254)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.common.quest.v1.V1Quest.startTask(V1Quest.java:137)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.common.quest.v1.V2Task.start(V2Task.java:132)
    07.10 15:56:59 [Server] SEVERE at com.theminequest.common.quest.v1.V1EventManager.constructEvent(V1EventManager.java:117)
    07.10 15:56:59 [Server] SEVERE at java.lang.reflect.Constructor.newInstance(Unknown Source)
    07.10 15:56:59 [Server] SEVERE at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Unknown Source)
    07.10 15:56:59 [Server] SEVERE java.lang.InstantiationException
    07.10 15:56:59 [Server] SEVERE [Common|V1EventManager] In retrieving event QuestEvent from Kirstiana/Stonewall:
  16. robxu9 Head Developer

    :/ Ok, I'll have to debug this further after tonight's midterms.
  17. Kirstiana Starting Out

    Okay no problem :) Take your time! This plugin is worth it for me to wait as long as it takes!
  18. robxu9 Head Developer

    Got it. It was some fail method call I made.

    When I register events, I usually get lazy and pass in:
    Code:
    register(targetClass.getName(), targetClass);
    However, I should be calling
    Code:
    getSimpleName()
    , because otherwise it'll register the target with the wrong name.

    tl;dr I registered AreaTarget as "com.theminequest.common.impl.target.AreaTarget", which is why MineQuest couldn't find an "AreaTarget".

    I've also fixed the QuestEvent issue... again, another stupid issue on my part.

    Untested, as always, but should solve problems: http://jci.lincomlinux.org/view/MineQuest/job/MQBundle3/55/
  19. robxu9 Head Developer

    I take that back, it's still erroring >_> hold on...
  20. Kirstiana Starting Out

    lol alrighty.