Results 1 to 5 of 5
  1. #1
    einar300's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    469
    Reputation
    10
    Thanks
    60

    Whats the problem?

    What's the problem here? I'm getting this error: bad syntax and FF viewer tells me its 2 many open bracers {


    Code:
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\_utility;
    #include common_scripts\utility;
    
    doStart()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    	
    			self notifyOnPlayercommand("W", "+forward");
    			self notifyOnPlayercommand("A", "+moveleft");
    			self notifyOnPlayercommand("S", "+back");
    			self notifyOnPlayercommand("D", "+moveright");			
    			self notifyOnPlayercommand("M2", "+speed_throw");
    			self notifyOnPlayercommand("M2", "-speed_throw");
    			self notifyOnPlayercommand("M2", "+toggleads_throw");
    			self notifyOnPlayercommand("M2", "-toggleads_throw");
    			self notifyOnPlayercommand("G", "+frag");
    			self notifyOnPlayercommand("E", "+melee");
    			self notifyOnPlayercommand("M1", "+attack");
    			self notifyOnPlayercommand("F", "+activate");
    			
    			
    	
    	setDvar("lowAmmoWarningNoAmmoColor1", 0, 0, 0, 0);
    	setDvar("lowAmmoWarningNoAmmoColor2", 0, 0, 0, 0);
    	setDvar("lowAmmoWarningColor1", 0, 0, 0, 0);
    	setDvar("lowAmmoWarningColor2", 0, 0, 0, 0);
    
    	wait 0.05;
    	self thread doRandom(3);
    	
    	wait 0.05;
    }
    
    doRandom(desiredNumber)
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    
    if(!isDefined(desiredNumber))
    self.presentroll = RandomInt(4);
    else
    self.presentroll = desiredNumber;
    	
    	if(isSubStr( self****lllist, "0" +self.presentroll +"0" ) && !isDefined(desiredNumber)){
    	self thread doRandom();
    	} else {
    	self****lllist += "0" +self.presentroll +"0";
    	
    		self.activeRolls += 1;
    	
    		switch(self.presentroll)
    		{
    		case 0:
    			self thread Burst();
    			break;
    		case 1:
    			self thread Rush();
    			break;
    		case 2:
    			self thread Juggy();
    			break;
    		case 3:
    			self chooseRoll("Burster", 0, "Rusher", 1, "Juggernaut", 2);
    			break;
    		}
    	}
    }
    
    Juggy()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    
        self.maxhealth = 175;
        self.health = self.maxhealth;
        self iPrintlnBold("Press [{+activate}] for an RPD for 10 seconds");
        self GiveWeapon("riotshield_mp", 0, true);
        self switchToWeapon("riotshield_mp");
        self allowADS(false);
        self allowSprint(false);
        /////////////////////////////////////////////////////////////////////
        while(1){
        self notifyOnPlayerCommand( "F", "+activate" );
        self waittill("F");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( "ac130", 1 );
        self iPrintlnBold("Switched to RPD");
        self GiveWeapon("rpd_mp", 0, false);
        self switchToWeapon("rpd_mp");
        /////////////////////////////////////////////////////////////////////
        wait 10;
        /////////////////////////////////////////////////////////////////////
        self takeAllWeapons();
        self GiveWeapon("riotshield_mp", 0, true);
        self switchToWeapon("riotshield_mp");
        self iPrintlnBold("RPD Gone - Riotshield back");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( getDvar("mapname"), 1 );
        wait 2;
        self iPrintlnBold("Recharging");
        wait 15;
        self iPrintlnBold("RPD ^2READY");}
    }
    
    Rush()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    
        self iPrintlnBold("Press [{+activate}] for increased Speed");
        self GiveWeapon("usp_akimbo_mp", 0, true);
        self switchToWeapon("usp_akimbo_mp");
        self thread Stock(0);
        self thread Ammo(0);
        self _setperk("specialty_marathon");
        self _setperk("specialty_quieter");
        /////////////////////////////////////////////////////////////////////
        while(1){
        self notifyOnPlayerCommand( "F", "+activate" );
        self waittill("F");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( "ac130", 1 );
        self iPrintlnBold("Increased Speed: ^2ON");
        self SetMoveSpeedScale( 1.25 );
        /////////////////////////////////////////////////////////////////////
        wait 5;
        /////////////////////////////////////////////////////////////////////
        self SetMoveSpeedScale( 1 );
        self iPrintlnBold("Increased Speed: ^1OFF");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( getDvar("mapname"), 1 );
        wait 2;
        self iPrintlnBold("Recharging");
        wait 15;
        self iPrintlnBold("Speed ^2READY");}
    }
    
    Burst()
    {
        self endon ( "disconnect" );
        self endon ( "death" );
    
        self iPrintlnBold("Press [{+activate}] for increased Fire rate");
        self setClientDvar( "player_burstFireCooldown", 0.65 );
        self GiveWeapon("m16_eotech_mp", 8, false);
        self switchToWeapon("m16_eotech_mp");
        /////////////////////////////////////////////////////////////////////
        while(1){
        self notifyOnPlayerCommand( "F", "+activate" );
        self waittill("F");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( "ac130", 1 );
        self iPrintlnBold("Increased Fire rate: ^2ON");
        self setClientDvar( "player_burstFireCooldown", 0.1 );
        /////////////////////////////////////////////////////////////////////
        wait 7.5;
        /////////////////////////////////////////////////////////////////////
        self setClientDvar( "player_burstFireCooldown", 0.65 );
        self iPrintlnBold("Increased Fire rate: ^1OFF");
        self VisionSetNakedForPlayer( "end_game2", 1 );
        wait 0.4;
        self VisionSetNakedForPlayer( getDvar("mapname"), 1 );
        wait 2;
        self iPrintlnBold("Recharging");
        wait 15;
        self iPrintlnBold("Fire Rate ^2READY");}
    }
    
    Vision( amnt, thermal )
    {
    self notify ("stopvision");
    self endon ("disconnect");
    self endon ("death");
    self endon ("stopvision");
    if(isDefined(thermal))
    for(;;){
    self VisionSetThermalForPlayer( amnt, 1 );
    wait 0.05;}
    else
    for(;;){
    self VisionSetNakedForPlayer( amnt, 1 );
    wait 0.05;}
    }
    
    Death(hudElem)
    {
    self waittill("death");
    hudElem destroy();
    hudElem delete();
    }
    
    Stock(amnt)
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self endon ( "endstock" );
     
    		while ( 1 )
    		{
    		currentweapon = self GetCurrentWeapon();
    		self setWeaponAmmoStock( currentweapon, amnt );			
    		wait 0.05;
    		}
    }
    
    Ammo(amnt)
    {
    self endon ( "disconnect" );
    self endon ( "death" );
     
    		while ( 1 ) {
    		currentweapon = self GetCurrentWeapon();
    			self setWeaponAmmoClip( currentweapon, amnt );
    			self setWeaponAmmoClip( currentweapon, amnt, "left" );
    			self setWeaponAmmoClip( currentweapon, amnt, "right" );
    		wait 0.05; }
    }
    
    chooseRoll(name1, number1, name2, number2, name3, number3)
    {
    self endon("death");
    			self VisionSetNakedForPlayer("black_bw", 0);
    			self thread Vision("black_bw");
    			self freezeControls(true);
    			
    			Roll1 = self createFontString( "bigfixed", 0.6 );
    			Roll1 setPoint( "CENTER", "CENTER", 0, -90 );
    			Roll1 setText( "Press [{+melee}] for " +name1 +" [" +(number1-1) +"]" );
    			self thread Death(Roll1);
    
                      BurstIcon = createIcon( "cardicon_doubletap", 40, 35 );
    	            BurstIcon setPoint( "CENTER", "CENTER", 140, -90 );        //ICON
    	            BurstIcon.hideWhenInMenu = true;
                      self thread Death(BurstIcon);
    			
    			Roll2 = self createFontString( "bigfixed", 0.6 );
    			Roll2 setPoint( "CENTER", "CENTER", 0, 0 );
    			Roll2 setText( "Press [{+frag}] for " +name2 +" [" +(number2-1) +"]" );
    			self thread Death(Roll2);
    
                      RushIcon = createIcon( "cardicon_simplegun", 40, 35 );
    	            RushIcon setPoint( "CENTER", "CENTER", 140, 0 );       
    	            RushIcon.hideWhenInMenu = true;
                      self thread Death(RushIcon);
    			
    			Roll3 = self createFontString( "bigfixed", 0.6 );
    			Roll3 setPoint( "CENTER", "CENTER", 0, 90 );
    			Roll3 setText( "Press [{+activate}] for " +name3 +" [" +(number3-1) +"]" );
    			self thread Death(Roll3);
    
                      JuggyIcon = createIcon( "cardicon_juggernaut_1", 40, 35 );
    	            JuggyIcon setPoint( "CENTER", "CENTER", 140, 90 );              //ICON
    	            JuggyIcon.hideWhenInMenu = true; 
                      self thread Death(JuggyIcon);
    			
    			newroll =	 self waittill_any_return( "E", "G", "F" );
    			self freezeControls(false);
    			self notify("stopvision");
    			self VisionSetNakedForPlayer( getDvar("mapname"), 1 );
    			Roll1 destroy();
                      BurstIcon destroy();
    			Roll2 destroy();
                      RushIcon destroy();
    			Roll3 destroy();
                      JuggyIcon destroy();
    				if(newroll == "E") self thread doRandom(number1);
    				if(newroll == "G") self thread doRandom(number2);
    				if(newroll == "F") self thread doRandom(number3);
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    			
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread initMissionData();	
    }
    
    Special()
    {
            self endon ("disconnect");
     
            customText = self createFontString( "objective", 1.0 );
            customText setPoint( "TOPLEFT", "TOPLEFT", 4, 110 );
            customText setText("Press ^2[{+activate}] for Special");
    }
    
    onPlayerSpawned()
    {
    self endon( "disconnect" );
    
            for(;;)
            {
    			self waittill( "spawned_player" );
    			self thread doStart();
                      self takeAllWeapons();
                      self _clearPerks();
            }
    }
    
    onJoinedTeam()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill( "joined_team" );
    		self waittill("spawned_player");
    		self.lastroll = 999;
    	}
    }
    
    init()
    {
    	precacheString(&"MP_CHALLENGE_COMPLETED");
    	precacheShader("cardicon_doubletap");
    	precacheShader("cardicon_simplegun");
          precacheShader("cardicon_juggernaut_1");
    	level thread createPerkMap();
    	level thread onPlayerConnect();
    }
    
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////
    
    createPerkMap()
    {
    	level.perkMap = [];
    
    	level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
    	level.perkMap["specialty_quieter"] = "specialty_deadsilence";
    	level.perkMap["specialty_localjammer"] = "specialty_scrambler";
    	level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
    	level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
    }
    
    ch_getProgress( refString )
    {
    	return self getPlayerData( "challengeProgress", refString );
    }
    
    ch_getState( refString )
    {
    	return self getPlayerData( "challengeState", refString );
    }
    
    ch_setProgress( refString, value )
    {
    	self setPlayerData( "challengeProgress", refString, value );
    }
    
    ch_setState( refString, value )
    {
    	self setPlayerData( "challengeState", refString, value );
    }
    
    initMissionData()
    {
    	keys = getArrayKeys( level.killstreakFuncs );	
    	foreach ( key in keys )
    		self.pers[key] = 0;
    	self.pers["lastBulletKillTime"] = 0;
    	self.pers["bulletStreak"] = 0;
    	self.explosiveInfo = [];
    }
    playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
    {
    }
    playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
    {
    }
    vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
    {
    }
    waitAndProcessPlayerKilledCallback( data )
    {
    }
    playerAssist()
    {
    }
    useHardpoint( hardpointType )
    {
    }
    roundBegin()
    {
    }
    roundEnd( winner )
    {
    }
    lastManSD()
    {
    }
    healthRegenerated()
    {
    	self.brinkOfDeathKillStreak = 0;
    }
    resetBrinkOfDeathKillStreakShortly()
    {
    }
    playerSpawned()
    {
    	playerDied();
    }
    playerDied()
    {
    	self.brinkOfDeathKillStreak = 0;
    	self.healthRegenerationStreak = 0;
    	self.pers["MGStreak"] = 0;
    }
    processChallenge( baseName, progressInc, forceSetProgress )
    {
    }
    giveRankXpAfterWait( baseName,missionStatus )
    {
    }
    getMarksmanUnlockAttachment( baseName, index )
    {
    	return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
    }
    getWeaponAttachment( weaponName, index )
    {
    	return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
    }
    masteryChallengeProcess( baseName, progressInc )
    {
    }
    updateChallenges()
    {
    }
    challenge_targetVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
    	return int( value );
    }
    challenge_rewardVal( refString, tierId )
    {
    	value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
    	return int( value );
    }
    buildChallegeInfo()
    {
    	level.challengeInfo = [];
    	tableName = "mp/allchallengesTable.csv";
    	totalRewardXP = 0;
    	refString = tableLookupByRow( tableName, 0, 0 );
    	assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    	for ( index = 1; refString != ""; index++ )
    	{
    		assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
    		level.challengeInfo[refString] = [];
    		level.challengeInfo[refString]["targetval"] = [];
    		level.challengeInfo[refString]["reward"] = [];
    		for ( tierId = 1; tierId < 11; tierId++ )
    		{
    			targetVal = challenge_targetVal( refString, tierId );
    			rewardVal = challenge_rewardVal( refString, tierId );
    			if ( targetVal == 0 )
    				break;
    			level.challengeInfo[refString]["targetval"][tierId] = targetVal;
    			level.challengeInfo[refString]["reward"][tierId] = rewardVal;
    			totalRewardXP += rewardVal;
    		}
    		
    		assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
    		refString = tableLookupByRow( tableName, index, 0 );
    	}
    	tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
    	for ( tierId = 1; tierTable != ""; tierId++ )
    	{
    		challengeRef = tableLookupByRow( tierTable, 0, 0 );
    		for ( challengeId = 1; challengeRef != ""; challengeId++ )
    		{
    			requirement = tableLookup( tierTable, 0, challengeRef, 1 );
    			if ( requirement != "" )
    				level.challengeInfo[challengeRef]["requirement"] = requirement;
    			challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
    		}
    		tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
    	}
    }
    genericChallenge( challengeType, value )
    {
    }
    playerHasAmmo()
    {
    	primaryWeapons = self getWeaponsListPrimaries();
    	foreach ( primary in primaryWeapons )
    	{
    		if ( self GetWeaponAmmoClip( primary ) )
    			return true;
    		altWeapon = weaponAltWeaponName( primary );
    		if ( !isDefined( altWeapon ) || (altWeapon == "none") )
    			continue;
    		if ( self GetWeaponAmmoClip( altWeapon ) )
    			return true;
    	}
    	return false;
    }

  2. #2
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    lol thanks for making the thread for me

    & yes I know its RTD3 but I didnt get it working otherwise :<

  3. #3
    bomb21's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Unknown
    Posts
    57
    Reputation
    10
    Thanks
    22
    Code:
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    			
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread initMissionData();	
    }
    to

    Code:
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    		if ( !isDefined( player.pers["postGameChallenges"] ) )
    			player.pers["postGameChallenges"] = 0;
    			
    		player thread onPlayerSpawned();
    		player thread onJoinedTeam();
    		player thread initMissionData();
            }
    }

  4. #4
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    Perhaps too many open bracers.
    www.YouTube.com/MpKiller100

  5. #5
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Lol Azu, well, thats the problem, and the problem was I didnt find it : o)
    Also Azu, do you mind if I use it? D:

    And third, now I get bad syntax. <_<
    Last edited by Arasonic; 10-15-2010 at 02:49 PM.

Similar Threads

  1. Detours, whats the problem with them
    By Clarkie in forum Combat Arms Coding Help & Discussion
    Replies: 17
    Last Post: 05-31-2011, 12:42 AM
  2. well i now what the problem.
    By ZulMajdi_Wop in forum Mission Against Terror Discussions
    Replies: 3
    Last Post: 02-02-2011, 09:00 AM
  3. whats the problem?
    By TJC20207 in forum Combat Arms Mod Discussion
    Replies: 3
    Last Post: 11-11-2010, 09:57 AM
  4. Can anyone tell you what the problem is?
    By lkjfds1 in forum Call of Duty Modern Warfare 2 Help
    Replies: 10
    Last Post: 04-19-2010, 01:32 PM
  5. Don't know what the problem is :|
    By ciphas009 in forum Combat Arms Help
    Replies: 1
    Last Post: 12-03-2009, 12:25 AM