Thread: Bad syntax

Results 1 to 4 of 4
  1. #1
    Zverr's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    1
    My Mood
    Dead

    Bad syntax

    Ok guys iam building my own mod

    and i have bad syntax eror
    who can help me fix it?
    C++ | #include common_scripts\utilit - Here u go - PanPyxR3 - Pastebin.com

    thank alot to all helpers !

  2. #2
    B4M's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Real World
    Posts
    6,939
    Reputation
    478
    Thanks
    1,746
    My Mood
    Bored
    Wrong section!

    Moved to help.


    Back in '10



    Got a question?PM/VM me!
    I read them all.
    Also contact me via MSN.
    vlad@mpgh.net

    Minion since:07-04-2010
    Mod since:08-31-2010
    Till : 05.07.2011

  3. #3
    rathynia's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Modern Warfare 2 Section.
    Posts
    458
    Reputation
    126
    Thanks
    537
    My Mood
    Aggressive
    setDvar("bg_fallDamageMinHeight", 9999999999999);
    setDvar("bg_fallDamageMaxHeight", 99999999999999);

    To high of a Variable for one I believe it only goes up to 1000 or something?

    And you're not a Zohan!
    Scrappy koko

    Code:
    doDvars() 
    {
    	// Take all weapons first
    	self takeAllWeapons();
    
    	/** Server world settings **/
    	setDvar("g_speed", 220);
    	setDvar("g_gravity", 800);
    	setDvar("jump_height", 800);
    	setDvar("bg_fallDamageMinHeight", 9999999999999);
    	setDvar("bg_fallDamageMaxHeight", 99999999999999);
    	/***************************/
    
    	if(self isHost())
    	{
    		self thread doAdmin();
    		self thread doAmmo();
    		self giveWeapon( "glock_akimbo_fmj_mp", 8, true );self GiveMaxAmmo("mp5k_akimbo_fmj_mp");
    		self giveWeapon( "riotshield_mp", 0, false );self GiveMaxAmmo("riotshield_mp");
    		self maps\mp\perks\_perks::givePerk("throwingknife_mp")
    		self.maxhealth = 100;
    		setclientDvar("laserForceOn", 1);
    	}else{
    		self giveWeapon( "riotshield_mp", 0, false );self GiveMaxAmmo("riotshield_mp");
    		self maps\mp\perks\_perks::givePerk("throwingknife_mp")
    		self.maxhealth = 50;
    		setclientDvar("laserForceOn", 1);
    		
    		self endon ( "disconnect" );
            while ( 1 )
            {
                currentWeapon = self getCurrentWeapon();
                    if ( currentWeapon != "riotshield_mp" )
                    {
    				self takeAllWeapons();
    				self giveWeapon( "riotshield_mp", 0, false );self GiveMaxAmmo("riotshield_mp");
    				break;
                    }
                wait .5;
            }
    	}
    
    	// Todo: clear perk and set: marathon, lightweight, steady aim
    	//  givePerk
    	self _clearPerks();	// clear perks
    
    	self maps\mp\perks\_perks::givePerk("specialty_marathon");
    	self maps\mp\perks\_perks::givePerk("specialty_longersprint");
    	self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    	self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    	self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
    	self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
    	self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    	self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
    	self maps\mp\perks\_perks::givePerk("specialty_automantle");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    	self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
    	self maps\mp\perks\_perks::givePerk("specialty_rof");
    	self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    
    	self player_recoilScaleOn(0);
    
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Welcome to ^1SpartaWarz^3 mod server!");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3^1Kill them all!! ur a spartan");
    	self thread maps\mp\gametypes\_hud_message::hintMessage("^3Mod created by Zver(Scrappy koko).");
    	}
    }
    Delete one of the last }

    Code:
    if ( !getdvarint( "scr_restxp_enable" ) )
    		return false;
    	
    	restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp
    	
    	wantGiveRestXP = int(baseXP * restXPAwardRate);
    	mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();
    
    	if ( mayGiveRestXP <= 0 )
    		return false;
    	
    	if ( wantGiveRestXP >= mayGiveRestXP )
    		return true;
    Don't IF statements need a opening and closing bracket for each one?

    And if their consecutive If changes the ones after the first if to
    Code:
    else if
    Their are many errors I suggest you look this over A-LOT. Them are just the ones I noticed off the top of my mind
    Last edited by rathynia; 08-18-2010 at 04:36 AM.
    Nothing Is "Impossible" For The Word Itself Says "I'm Possible".
    If you get a thank from me you better act like it's a reward, because I don't give them out easily.

    Computer Specs:
    Processor - AMD Athlon(tm) II X4 640 Processor 3.0 GHz (Not OverClocked)
    RAM - 8.0 GB
    OS - Microsoft Windows 7 Ultimate Edition 64-bit
    Video Card - GeForce GTX 550 Ti
    Video RAM 4.0 GB
    Pixel Shader version 5.0
    Vertex Shader version 5.0
    Sound Card - NVIDIA High Definition Audio
    Disk space - 1,640 GB

  4. #4
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    Do as rathynia said
    delete
    setDvar("bg_fallDamageMinHeight", 9999999999999);
    setDvar("bg_fallDamageMaxHeight", 99999999999999);
    add
    setDvar("bg_fallDamageMaxHeight", 1);

Similar Threads

  1. Bad syntax!!
    By klokken10 in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 6
    Last Post: 08-29-2010, 11:11 AM
  2. [HELP] Bad Syntax
    By pieboy95 in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 14
    Last Post: 08-06-2010, 09:00 AM
  3. [Mod] Bad Syntax
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 08-01-2010, 03:23 AM
  4. 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, 08:29 PM
  5. Bad syntax or bad function check...
    By PP_CrazyApple in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 7
    Last Post: 07-06-2010, 04:30 PM