1.3 Event Triggers #108


  • Defect
  • Replied
Open
Assigned to _ForgeUser8773666
  • Forge_User_47264883 created this issue Mar 21, 2014

    What steps will reproduce the problem?
    1. Installing 1.3 :D
    2. Having an event timer trigger
    3.

    What is the expected output? What do you see instead?
    The Triggers wont be executed properly, the console will show this Warning:
    16:11:49 [WARNING] Exception in thread "Thread-9"
    16:11:49 [WARNING] java.lang.NullPointerException
    16:11:49 [WARNING]     at java.lang.String.replace(Unknown Source)
    16:11:49 [WARNING]     at com.wizardscraft.scripting.ScriptInterpreter.Interpret(ScriptInterpreter.java:335)
    16:11:49 [WARNING]     at com.wizardscraft.scripting.ScriptInterpreter.run(ScriptInterpreter.java:308)
    16:11:49 [WARNING]     at java.lang.Thread.run(Unknown Source)

    What version of the product are you using?
    1.3

    Do you have an error log of what happened?
    16:11:49 [WARNING] Exception in thread "Thread-9"
    16:11:49 [WARNING] java.lang.NullPointerException
    16:11:49 [WARNING]     at java.lang.String.replace(Unknown Source)
    16:11:49 [WARNING]     at com.wizardscraft.scripting.ScriptInterpreter.Interpret(ScriptInterpreter.java:335)
    16:11:49 [WARNING]     at com.wizardscraft.scripting.ScriptInterpreter.run(ScriptInterpreter.java:308)
    16:11:49 [WARNING]     at java.lang.Thread.run(Unknown Source)

    Please provide any additional information below.

  • Forge_User_47264883 added the tags New Defect Mar 21, 2014
  • Forge_User_47264883 edited description Mar 21, 2014
  • Lyoko_Firelyte posted a comment Mar 22, 2014

    Could you post the script you tried to run?

  • Lyoko_Firelyte removed a tag New Mar 22, 2014
  • Lyoko_Firelyte added a tag Waiting Mar 22, 2014
  • Forge_User_47264883 posted a comment Mar 22, 2014

    Yeah sure:

        - '@ADDINT $temp.zeit 1'
        - '@IF i $temp.zeit = 15'
        - '@CMDCON save-all'
        - '@CMDCON weather world sun'
        - '@ENDIF'
        - '@IF i $temp.zeit = 30'
        - '@CALL stats:reorder'
        - '@SETINT $temp.zeit 0'
        - '@ENDIF'
        - '@IF i $temp.zeit = 0'
        - '@OR i $temp.zeit = 4'
        - '@OR i $temp.zeit = 8'
        - '@OR i $temp.zeit = 12'
        - '@OR i $temp.zeit = 16'
        - '@OR i $temp.zeit = 20'
        - '@OR i $temp.zeit = 24'
        - '@OR i $temp.zeit = 28'
        - '@CALL mein:am'
        - '@ENDIF'
        - '@IF i $temp.zeit > 30'
        - '@SETINT $temp.zeit 0'
        - '@ENDIF'
    

    Its nothing special, the mein:am is an automessage script. Nothing fancy there neither. Only a <random1to:9> call and IFs that broadcast depending on the random output.

  • Forge_User_47264883 removed a tag Waiting Mar 22, 2014
  • Forge_User_47264883 added a tag Replied Mar 22, 2014
  • Forge_User_47264883 posted a comment Mar 22, 2014

    Cant wait to make my whole code much cleaner with the new @case ;)

  • Lyoko_Firelyte posted a comment Mar 22, 2014

    Ah, that was my bad. It was trying to pull <playerloc:x> but I didn't give it a default value if a player didn't trigger it. I don't want to update already because it's literally 3 characters of code, so here's a fixed jar:

    Link

  • Lyoko_Firelyte removed a tag Replied Mar 22, 2014
  • Lyoko_Firelyte added a tag Waiting Mar 22, 2014
  • Forge_User_47264883 posted a comment Mar 23, 2014

    @Lyoko_Firelyte: Go

    Thanks, the problem is gone!


    Edited Mar 23, 2014
  • Forge_User_47264883 removed a tag Waiting Mar 23, 2014
  • Forge_User_47264883 added a tag Replied Mar 23, 2014
  • Forge_User_47264883 posted a comment Mar 23, 2014

    Another thing, dont mind creating a new ticket for it, could you add the possibility to Log $obj.vars with @PRINT ? It currently doesnt seem to work. That would be neat! Also why didn't you add the possibility to use si with the @SWITCH ?

    Another edit: <eval:> logs its result in the console.


    Edited Mar 23, 2014
  • Lyoko_Firelyte posted a comment Mar 26, 2014

    Sorry I accidentally left some debug info in there. I'll clean that up next build. As si it is because the extra letter messes up my switch code.

  • Forge_User_47264883 posted a comment Mar 26, 2014

    @Lyoko_Firelyte: Go

    Would you be opened about the @PRINT var integration? ;)

  • Lyoko_Firelyte posted a comment Mar 27, 2014

    @H8llfire: Go

    Yes that's actually already fixed in 3.1 I accidentally forgot to run @PRINT through the replace variable method :)


To post a comment, please login or register a new account.