1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you have a problem and need help, create a new thread with a title that briefly describes the problem.
    Do not use titles like 'Help!' or 'I have a problem!'
    Dismiss Notice
  3. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Can't start server, dedicated_autoconfig.gm missing ';' ?

Discussion in 'Server Help' started by A2R, Feb 2, 2012.

  1. A2R

    A2R Catapult Fodder

    Messages:
    4
    I don't understand why my server is not working.

    My error message:

    Changing game working directory to '/home/kag/kag_linux/Base/'
    [] Script error: Scripts/dedicated_autoconfig.gm
    [] error (11) [ COMMANDS NEED A '\' or '/' PREFIX ] parse error

    Could not load autoconfig file Scripts/dedicated_autoconfig.gm
    STARTUP FAILED: Could not load autoconfig file Scripts/dedicated_autoconfig.gm (error in file, missing ';' ?)
    THE END
    ./ds2.sh: line 7: autoconfig: command not found
    KAG server running

    dedicated_autoconfig.gm:

    global m_width = 320;
    global m_height = 160;
    global m_seed = 0;
    global g_kickvote_percent = 33;
    global g_mapvote_percent = 51;
    global g_vote_time = 60;
    global g_kickvote_bantime = 30;
    global sv_maxplayers = 24;
    global sv_port = 50301;
    global sv_password = '';
    global sv_password = '';
    global sv_require_auth = 1;
    global sv_gold_only = 0;
    global sv_allow_globals_mods = 1;
    global sv_deltapos_modifier = 1;
    global sv_maxping = 450;
    global sv_maxping_warnings = 200;
    global sv_maxhack_warnings = 25;
    global sv_alloweditor = 0;
    global sv_name = 'Great Enemy';
    global sv_info = 'server';



    No lines are missing ';', would be great if the error reported what line it thought a missing ';' were at.

    ds2.sh:

    #!/bin/bash
    echo "Running KAG dedicated server"
    echo "TO SET IP/PORT/SLOTS/PASSWORD ADD THESE COMMAND PARAMS: ip 127.0.0.1 port 50213 slots 32 password pass123"
    mv KAGdedi.tmp KAGdedi
    chmod +x KAGdedi
    until ./KAGdedi nolauncher autostart Scripts/dedicated_autostart.gm
    autoconfig Scripts/dedicated_autoconfig.gm; do
    echo "KAG server running"
    sleep 5
    done


    Earlier, I was able to make a server using the pythonscript, but recently it starts a server that no one can join.
     
  2. Strech

    Strech KAG Guard Tester

    Messages:
    125
    I had a loooot of times this problem (i used to edit it often), sometimes i found a parse mistake, sometimes i didn't...
    BTW your dedicated autoconfig seems really short to me.
    Replace it with this: http://dl.dropbox.com/u/28972927/dedicated_autoconfig.gm
    It should work then... ;)
     
  3. A2R

    A2R Catapult Fodder

    Messages:
    4
    I got my config from the linux server article of the wiki.

    Using your configuration file 'as is':

    Precaching files.
    [0] ...Precaching files.
    [0] Loading config defines Scripts/defines.cfg
    ./ds2.sh: line 10: 2560 Segmentation fault ./KAGdedi nolauncher autostart Scripts/dedicated_autostart.gm
    ./ds2.sh: line 7: autoconfig: command not found

    I think the game is refusing to consume the slanted apostrophies, and its giving me errors on some of the lines when I replace them with normal ones. After replacing them with regular quotation marks, I up with:

    Precaching files.
    [0] ...Precaching files.
    [0] Loading config defines Scripts/defines.cfg
    ./ds2.sh: line 10: 2794 Segmentation fault ./KAGdedi nolauncher autostart Scripts/dedicated_autostart.gm
    ./ds2.sh: line 7: autoconfig: command not found
     
  4. Teemo

    Teemo T͔̕e͖͚̖̯̩̪͙͝e͡m̖o̤̪͘ Forum Moderator Donator Tester

    Messages:
    244
    use ` - it's not a "slanted apostrophe"
    one line.

    the issue isn't his configure. it's your .sh "script"
     
    trelawney likes this.
  5. A2R

    A2R Catapult Fodder

    Messages:
    4
    It wasn't my script, I pulled it from a tutorial off this site. Here is my new error:

    Precaching files.
    [0] ...Precaching files.
    [0] Loading config defines Scripts/defines.cfg
    ./ds2.sh: line 9: 3087 Segmentation fault ./KAGdedi nolauncher autostart Scripts/dedicated_autostart.gm autoconfig Scripts/dedicated_autoconfig.gm
     
  6. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    When copy+paste fails, use method #2 :) , ssh to your box, and
    Code:
    wget http://dl.dropbox.com/u/23114384/files/dedi.sh
    chmod +x dedi.sh , and you should be ready to go. (you were missing the semicolon that was part of the until loop). That should take care of some breakage. But it seems there's more. As teemo instructed,you need to use grave accents instead of apostrophes. That should take care of it.
    Code:
    ``````
    instead of
    
    ''''
    No idea what causes the segfault tbh.. What do you get when you run ./KAGdedi alone, without scripts?
     
  7. A2R

    A2R Catapult Fodder

    Messages:
    4
    Running ./KAGdedi :

    [0] Variable sv_maxhack_warnings has NULL type
    [0] Variable sv_alloweditor has NULL type
    [0] Variable auth_key has NULL type
    [0] Precaching files...
    Precaching files.
    [0] ...Precaching files.
    [0] Loading config defines Scripts/defines.cfg
    Segmentation fault
    $

    On another note, sconfig.py works. It can't be used with the autorestart script as far as I know and for obvious reasons.
     
  8. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    It's not another note at all, it's proof that your original dedicated_autoconfig.gm was riddled with typos or misconfigured. All sconfig.py does is to create a separate configuration file custom-made with your settings, no magic whatsoever.