Zombies zombie counter gsc problems

Topic created · 6 Posts · 129 Views
  • I found the tutorial on AOW forums for modding the game, and downloaded everything for gsc modding, but when I try and use the ZombiesSimple mod for a zombie counter for my server it does work.

    Opened up the code, required certain GSC's, so I put each one in their proper place, and my server would never launch, giving error codes. I used AOW's example GSC that doesn't require anything and it worked fine, so it was nothing on my end. Turns out once I placed the required GSC's in the included compiler, on every single one it says that there are syntax errors.

    So my first question is, is it possible to get a zombie counter without requiring
    #include common_scripts\utility;
    #include maps\mp\zombies_zm;
    #include maps\mp\zombies_zm_utility;
    #include maps\mp\gametypes_zm_hud_util;
    #include maps\mp\gametypes_zm_hud_message;
    #include maps\mp_utility;
    #include common_scripts\utility;
    Or because the mod is calling 2 #include common_scripts\utility, could that be an issue as well? I don't think it is because syntax errors are pretty big and stop code from functioning.

    Second question, how would I fix the broken GSC's? Because when I check the lines it doesn't look wrong. Or Can someone link me to a better mod and working GSC's?

    An example of where it says the code has syntax errors; (This is in common_scripts\utility)
    vector_compare( vec1, vec2 )
    { <- Called line for syntax error
    if ( abs( vec1[ 0 ] - vec2[ 0 ] ) < 0,001 && abs( vec1[ 1 ] - vec2[ 1 ] ) < 0,001 )
    {
    return abs( vec1[ 2 ] - vec2[ 2 ] ) < 0,001;
    }
    }

  • #include maps\mp\_utility;
    #include common_scripts\utility;
    #include maps\mp\gametypes_zm\_hud_util;
    #include maps\mp\gametypes_zm\_hud_message;
    #include maps\mp\zombies\_zm_utility;
    
    init()
    {
        level thread drawZombiesCounter();
    }
    
    drawZombiesCounter()
    {
        level.zombiesCounter = createServerFontString("hudsmall" , 1.2);
        level.zombiesCounter setPoint("CENTER", "CENTER", "CENTER", 190);
        while(true)
        {
        	enemies = get_round_enemy_array().size + level.zombie_total;
            if ( enemies <= 3 )
            	level.zombiesCounter.label = &"Zombies: ^3";
            else if( enemies != 0 )
                level.zombiesCounter.label = &"Zombies: ^2";
            else
            	level.zombiesCounter.label = &"Zombies: ^1";
            level.zombiesCounter setValue( enemies );
            wait 0.05;
        }
    }
    
  • If you just want a working tool, refer to @mikey's answer. If you want to actually understand what is syntactically wrong with code that you have, look into the basics of GSC. To get you started, your example code has decimal numbers typed 0,001 instead of 0.001.

  • Thank you @mikey , and @birchy thats something I literally did not notice, I'll have to go and correct all of them, thank you for pointing it out!

  • @mikey where would I put the file? just anywhere in the plutonium folder? Also would I need to compile the GSC as well

Log in to reply