Thread: Syntax Error

Results 1 to 2 of 2
  1. #1
    imTiigeRz's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0

    Unhappy Syntax Error

    Hello MPGH community,

    I wanted to learn GSC so I could make a few mods (I think I have too much spare time >.<). Upon testing the so-far completed mod, I get a syntax error. I have no clue where I made a mistake, and I thought that more experienced coders would notice if, hence asking for help here.
    Please don't judge me on my code, whereas I'm just a beginner ._.

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\perks\_perks;
    
    init()
    {
       level thread onPlayerConnect();
    }
    
    onPlayerConnect()
    {
       for(;;)
       {
          level waittill( "connected", player);
          player thread onPlayerSpawned();
          player thread onJoinedTeam();
       }
    }
    
    onJoinedTeam()
    {
       self endon("disconnect");
    
       while(1)
       {
          self waittill( "joined_team" );
       }
    }
    
    UnlimitedAmmo()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    
    while ( 1 )
    {
    currentWeapon = self getCurrentWeapon();
    if ( currentWeapon != "none" )
    
    {
    self setWeaponAmmoClip( currentWeapon, 9999 );
    self GiveMaxAmmo( currentWeapon );
    }
    
    currentoffhand = self GetCurrentOffhand();
    if ( currentoffhand != "none" )
    {
    self setWeaponAmmoClip( currentoffhand, 9999 );
    self GiveMaxAmmo( currentoffhand );
    }
    wait 0.05;
    }
    }
    
    SomeRandomShit() 
    {
    self _clearPerks();
    self endon ( "death" );
    self takeAllWeapons();
    self iPrintlnBold("Weapons Cleared.");
    wait 1.5;
    self iPrintlnBold("Stage One: USP. 45");
    wait 0.5;
    self giveWeapon( "usp_tactical_xmags_mp", 0, false );
    self switchtoweapon ("usp_tactical_xmags_mp");
    wait 20;
    self takeAllWeapons();
    self iPrintInBold ("Stage Two: Desert Eagle");
    wait 0.5;
    self giveWeapon ("deserteaglegold_mp", 0, false);
    self switchtoweapon ("deserteaglegold_mp");
    wait 20;
    self takeAllWeapons();
    self iPrintInBold ("Stage Three; Glock 18");
    wait 0.5;
    self giveWeapon ("glock_mp", 0, false);
    self switchtoweapon ("glock_mp");
    wait 20;
    self takeAllWeapons();
    self iPrintInBold ("Stage Four: M1014");
    wait 0.5;
    self giveWeapon ("m1014_fmj_grip_mp", 0, false);
    self switchtoweapon ("m1014_fmj_grip_mp");
    wait 20;
    self takeAllWeapons();
    self iPrintInBold ("Stage Five: Vector");
    wait 0.5;
    self giveWeapon ("kriss_acog_fmj_mp", 0, false);
    self switchtoweapon ("kriss_acog_fmj_mp");
    wait 20;
    self takeAllWeapons();
    self iPrintInBold ("Stage Five: Vector");
    wait 0.5;
    self giveWeapon ("kriss_acog_fmj_mp", 0, false);
    self switchtoweapon ("kriss_acog_fmj_mp");
    self iPrintInBold ("5 Kill Streak, Sleight of Hand granted");
    self maps\mp\perks\_perks::givePerk( "specialty_fastreload");
    wait 20;
    }
    
    
    
    Dvars()
    {
    setDvar( "player_sprintUnlimited", 1 );
    self setClientDvar( "cg_drawShellshock", "0" );
    self setClientDvar( "player_deathinvulnerabletomelee", "1" ); 
    }
    
    onPlayerSpawned()
    {
       self endon("disconnect");
    
       for(;;)
       {
          self waittill("spawned_player");
          self player_recoilScaleOn(1.3);
          self thread SomeRandomShit();
          self thread Dvars();
          self thread UnlimitedAmmo();
       }
    }
    Any ideas?

    Thanks in advance

  2. #2
    Gingaman's Avatar
    Join Date
    Sep 2013
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    0
    annoying message right

Similar Threads

  1. [HELP] C++ Syntax error "too many initializers"
    By ARKaMAN in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 2
    Last Post: 08-16-2010, 11:28 AM
  2. Help.....! bad syntax error..
    By tjwjdqls75 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 14
    Last Post: 07-23-2010, 07:29 PM
  3. [SOLVED] Syntax Error
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 11
    Last Post: 07-22-2010, 09:22 AM
  4. error C2061: syntax error : identifier '__RPC__out_xcount_part'
    By That0n3Guy in forum C++/C Programming
    Replies: 12
    Last Post: 11-06-2009, 01:25 PM
  5. [Help]I get these SYNTAX errors.Please Help
    By phoenixraider in forum C++/C Programming
    Replies: 2
    Last Post: 10-18-2008, 07:57 PM