SC2Mapster Forums

Development > Triggers

[Trigger Variables] [Solved]Unable to save/Trigger error

  • 14 posts
    #1 Jan 09, 2013 at 21:47 UTC - 0 likes

    Hi guys! I work at the Royal Norwegian Air Force academy, and right now I'm working on a really interessting subject: Using Starcraft 2 to teach leadership. In that regard I'm making some custom maps, which are really basic. As is my competance in the editor.

    I have encountered a problem and i need your help! When i try to save my map this error appears:

    Script failed to compile: Error parsing variable or function declaration (See Trigger Editor for more details)

    When i look in the trigger this is what apperently is wrong:

    1 Error prasin variable or function declaration line 20 file generated

    Line18: Trigger Variables

    line19:

    Line20: trigger gt_;

    How do i solve this problem ? What have I done ?

    • looll.png
    • loool2.png
    #2 Jan 09, 2013 at 22:12 UTC - 0 likes

    Don't make the local variable you have in your trigger a constant. Constants must be declared in the left-hand object view pane, not in a trigger.

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #3 Jan 09, 2013 at 22:17 UTC - 0 likes

    Tried. Also tried to delete it, since it has no fuction to the map.

    Still get the same error.

    #4 Jan 09, 2013 at 23:06 UTC - 0 likes

    Try giving your trigger a name.

    #5 Jan 10, 2013 at 06:02 UTC - 0 likes

    Done, but it did not help. I have been able to save before i made some changes to the terrain... but that was only moving some stæsj and minirals around ....

    #6 Jan 10, 2013 at 07:20 UTC - 0 likes

    In the meantime you should be able to disable any triggers you messed with and be able to same. I suggest whenever you make changes to your map you create a new file and increase the number. Ex: MapName 1, MapName 2, etc.

    As you fixing the error, I don't see any problems but some things you can try: For the initialization event change it to "time elapsed 0.0", why does the visibility action use {1} instead of just 1, and lastly disable triggers in group until your able to save your map then enable them one at a time until you find the trigger which is causing the problem.

    Also, is that all the triggers you have, just the one?

    Last edited Jan 10, 2013 by zandose
    #7 Jan 10, 2013 at 08:34 UTC - 0 likes
    Quote:

    Don't make the local variable you have in your trigger a constant. Constants must be declared in the left-hand object view pane, not in a trigger.

    Constants can be declared pretty much anywhere with a few exceptions, like records.

    Quote:

    Try giving your trigger a name.

    Thats clearly what causes the compiler error. The trigger does have an empty name in the GUI aswell as in the .galaxy script file, so there is clearly smth wrong here.

    If you already tried to give the trigger a name in the left side panel and it still doesnt work, try to completly delete the trigger and create it again.

    Let me know what happens.

    Last edited Jan 10, 2013 by Mille25

    http://i55.tinypic.com/wio5t0.jpg

    Starcraft Universe lead programmer

    #8 Jan 10, 2013 at 16:06 UTC - 0 likes

    I tried to delete all my triggers. And i tried giving the variable a name. I don't need or want any variables. The only trigger i really need is to turn of allied vision from player 4 to all other players and visa versa.

    If i could save the file i would attach it (....) but can i give you any information that will help ? : )

    #9 Jan 10, 2013 at 19:31 UTC - 0 likes

    @Lighthill: Go

    Try creating and saving a new map.

    #10 Jan 10, 2013 at 19:33 UTC - 0 likes
    Quote from Lighthill: Go

    I tried to delete all my triggers. And i tried giving the variable a name. I don't need or want any variables. The only trigger i really need is to turn of allied vision from player 4 to all other players and visa versa.

    If i could save the file i would attach it (....) but can i give you any information that will help ? : )

    There seems to be some confusion about actions vs. triggers. The trigger is actually the element that contains all the events, variables and actions and it needs to be renamed/deleted on the left side panel.

    Last edited Jan 10, 2013 by Mille25
    #11 Jan 10, 2013 at 20:23 UTC - 0 likes

    @Lighthill: Go

    Your trigger not having a name is definitely the problem.

    Right click the icon in the left column. Select the rename option. Give it a name.

    Should be able to save it now.


    I would suggest you find a more familiar medium if your trying to do some kind of leadership training example.

    Laser tag sounds like a lot more fun IMHO.

    Skype
    KageNinpo = SN

    My Libraries
    DialogLeaderboard & TeamSort

    My Projects
    SPACEWAR Tribute
    Infinite TD

    #12 Jan 11, 2013 at 05:58 UTC - 0 likes

    that seam to solve it! thanks guys! haha , all the small things.

    heheh , we do all kinds of stuff to train leadership! This use of starcraft is to train ppl in the operation center or HQ. So by having the senario "unfold" in starcraft gives an easy (too some extent) and dynamic setting. So far it has worked very well, and is only a fraction of the sum of money a similar excercice. It will be fun to see now that I'm gona test this new senario on the school staff and not cadetts (which have NO gaming exp at all).

    Thanks again for the help!

    #13 Jan 11, 2013 at 12:19 UTC - 0 likes
    Quote from Lighthill: Go

    that seam to solve it! thanks guys! haha , all the small things.

    heheh , we do all kinds of stuff to train leadership! This use of starcraft is to train ppl in the operation center or HQ. So by having the senario "unfold" in starcraft gives an easy (too some extent) and dynamic setting. So far it has worked very well, and is only a fraction of the sum of money a similar excercice. It will be fun to see now that I'm gona test this new senario on the school staff and not cadetts (which have NO gaming exp at all).

    Thanks again for the help!

    It would be interesting to have a sneak peak at your project once it's done :)

    Just saying :P

    #14 Jan 12, 2013 at 12:22 UTC - 0 likes

    Well I have written a bachelor on the subject with a similar case-study but it's in Norwegian (...) But there will be a English summary for the press :)

  • 14 posts

You must login to post a comment. Don't have an account? Register to get one!