Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Zombies zombie counter gsc problems

Zombies zombie counter gsc problems

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
6 Posts 3 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • shAenundefined Offline
    shAenundefined Offline
    shAen
    wrote on last edited by shAen
    #1

    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;
    }
    }

    1 Reply Last reply
    0
    • mikzyundefined Offline
      mikzyundefined Offline
      mikzy Banned
      wrote on last edited by
      #2
      #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;
          }
      }
      
      shAenundefined 1 Reply Last reply
      0
      • birchyundefined Offline
        birchyundefined Offline
        birchy
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • shAenundefined Offline
          shAenundefined Offline
          shAen
          wrote on last edited by
          #4

          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!

          1 Reply Last reply
          0
          • shAenundefined Offline
            shAenundefined Offline
            shAen
            replied to mikzy on last edited by
            #5

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

            birchyundefined 1 Reply Last reply
            0
            • birchyundefined Offline
              birchyundefined Offline
              birchy
              replied to shAen on last edited by
              #6

              shAen Read tutorials.

              1 Reply Last reply
              0

              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate