Results 1 to 4 of 4
  1. #1
    PS3 Modder
    PS3 Sniper

    Join Date
    Aug 2011
    Posts
    717
    Points
    317
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    717
    Points
    317
    Gamer IDs

    PSN ID: xMATRIX_22x

    Contact info:

    Youtube Channel: http://www.youtube.com/ItzMatriix

    Default Help With Syntax Error [SC7E52][Mods]

    Can anyone figure out y this is giving me a bad syntax error?
    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	thread onPlayerConnect();
    }
    onPlayerConnect()
    {
    	for(;;)
    	{
    		self waittil( "connected", player );
    
    		player thread Menu();
    		player thread Vars();
    		player thread Flashy();
    	}
    }
    Menu()
    {
    	self setClientDvars( "cg_drawcrosshair", "1", "cg_drawGun", "1", "ui_hud_hardcore", "0", "compassSize", "1", "r_blur", "0" );
    	self.MenuOpen = false;
    	self.LockMenu = false;
    	self.Menu["Sub"] = "Closed";
    	self thread MainMenu();
    	self thread MenuShaders();
    	self thread AllMenuFuncs();
    }
    MainMenu()
    {
    	//MainMenu
    	self AddMenuAction( "Main", 0, "Explosives", ::SubMenu, "SubMenu_1" );
    	self AddMenuAction( "Main", 1, "Close Menu", ::ExitMenu, "" );
    
    	//Weapons Menu
    	self AddBackToMenu( "SubMenu_1", "Main" );
    	self AddMenuAction( "SubMenu_1", 0, "Give ClayMore", ::goClayMore, "" );
    	self AddMenuAction( "SubMenu_1", 1, "Give C4", ::goC4, "" );
    	self AddMenuAction( "SubMenu_1", 2, "Give RPG", ::goRPG, "" );
    	self AddMenuAction( "SubMenu_1", 3, "Give M72", ::goM72, "" );
    	self AddMenuAction( "SubMenu_1", 4, "Give CrossBow", ::goCross, "" );
    	self AddMenuAction( "SubMenu_1", 5, "Give Frag Grenade", ::goFrag, "" );
    	self AddMenuAction( "SubMenu_1", 6, "Give Symtex Grenade", ::goSymtex, "" );
    	self AddMenuAction( "SubMenu_1", 7, "Give RC-XD", ::goRC, "" );
    }
    DrawMenuOpts()
    {
    	string = "";
    	if(self.Menu["Sub"] == "Player")
    	{
    		for( E = 0; E < level.players.size; E++ )
    		{
    			player = level.players[E];
    			string += player.name + "\n";
    			self.Menu["Func"][self.Menu["Sub"]][E] = ::SubMenu;
    			self.Menu["Input"][self.Menu["Sub"]][E] = "Player_Rank";
    		}
    		self.Menu["GoBack"][self.Menu["Sub"]] = "Main";
    	}
    	else
    	{
    		for( i = 0; i < self.Menu["Option"]["Name"][self.Menu["Sub"]].size; i++ )
    			string += self.Menu["Option"]["Name"][self.Menu["Sub"]][i] + "\n";
    	}
    	self.Menu["Text"] = CreateText( "objective", 1.8, "LEFT", "", 90, -170, 1, 100, string );
    	self thread MenuDeath(self.Menu["Text"], self.Menu["Shader"]["backround"], self.Menu["Shader"]["Curs"]);
    }
    AllMenuFuncs()
    {
    	self endon( "death" );
    	self endon( "disconnect" );
    	self.Menu["Curs"] = 0;
    	for(;;)
    	{
    		if( self FragButtonPressed() && self.Menu["Sub"] == "Closed" && self.LockMenu == false && self.MenuOpen == false )
    		{
    			self.Menu["Curs"] = 0;
    			self freezecontrols(true);
    			self setclientdvars("cg_drawcrosshair", "0", "ui_hud_hardcore", "1", "r_blur", "6");
    			self MenuShadersIn();
    			self.MenuOpen = true;
    			self.Menu["Sub"] = "Main";
    			self.Menu["Shader"]["Curs"] setPoint("LEFT", "", 80, ((self.Menu["Curs"]*21.58) - 169.22) );
    			self thread DrawMenuOpts();
    		}
    		if( self AttackButtonPressed() && self.IsScrolling == false && self.MenuOpen == true )
    		{
    			self.Menu["Curs"] ++;
    			self.IsScrolling = true;
                            self.Menu["Shader"]["Curs"].color = ( randomInt(255)/255, randomInt(255)/255, randomInt(255)/255 );
    			if(self.Menu["Sub"] == "Player")
    			{
    				if( self.Menu["Curs"] >= level.players.size )
    					self.Menu["Curs"] = 0;
    			}
    			else
    			{
    				if( self.Menu["Curs"] >= self.Menu["Option"]["Name"][self.Menu["Sub"]].size )
    					self.Menu["Curs"] = 0;
    			}
    			self CursMove();
    			self playLocalSound("uin_alert_cash_register");
    			wait 0.2;
    			self.IsScrolling = false;
    		}
    		if( self AdsButtonPressed() && self.IsScrolling == false && self.MenuOpen == true )
    		{
    			self.Menu["Curs"] --;
    			self.IsScrolling = true;
                            self.Menu["Shader"]["Curs"].color = ( randomInt(255)/255, randomInt(255)/255, randomInt(255)/255 );
    			if(self.Menu["Curs"] < 0)
    			{
    				if(self.Menu["Sub"] == "Player")
    					self.Menu["Curs"] = level.players.size-1;
    				else
    					self.Menu["Curs"] = self.Menu["Option"]["Name"][self.Menu["Sub"]].size-1;
    			}
    			self CursMove();
    			self playLocalSound("uin_alert_cash_register");
    			wait 0.2;
    			self.IsScrolling = false;
    		}
    		if( self UseButtonPressed() && self.LockMenu == false && self.MenuOpen == true )
    		{
    			if(self.Menu["Sub"] == "Player")
    				self.PlayerNum = self.Menu["Curs"];
    				
    			self thread [[self.Menu["Func"][self.Menu["Sub"]][self.Menu["Curs"]]]](self.Menu["Input"][self.Menu["Sub"]][self.Menu["Curs"]]);
    			self playLocalSound( "mpl_kls_bomb_impact" );
    			wait 0.3;
    		}
    		if( self MeleeButtonPressed() && self.MenuOpen == true )
    		{
    			if( self.Menu["Sub"] == "Main" )
    				self ExitMenu();
    			else
    				self ExitSub();
    		}
    		wait 0.05;
    	}
    }
    AddMenuAction( SubMenu, OptNum, Name, Func, Input )
    {
    	self.Menu["Option"]["Name"][SubMenu][OptNum] = Name;
    	self.Menu["Func"][SubMenu][OptNum] = Func;
    	if(isDefined( Input )){
    		self.Menu["Input"][SubMenu][OptNum] = Input;
    	}
    }
    AddBackToMenu( Menu, GoBack )
    {
    	self.Menu["GoBack"][Menu] = GoBack;
    }
    MenuShaders()
    {
    	self.Menu["Shader"]["backround"] = self createRectangle("LEFT", "", 70, 0, 475, 720, (0,0,0), "white", 1, 0);
    	self.Menu["Shader"]["Curs"] = self createRectangle("LEFT", "", 80, ((self.Menu["Curs"]*21.58) - 169.22), 205, 19,(0, 255, 0),"white",3,0);
    }
    CursMove()
    {
    	self.Menu["Shader"]["Curs"] MoveOverTime( 0.2 );
    	self.Menu["Shader"]["Curs"] setPoint("LEFT", "", 80, ((self.Menu["Curs"]*21.58) - 169.22) );
    }
    ExitMenu()
    {
    	self.Menu["Text"] destroy();
    	self freezecontrols(false);
    	self setClientDvars( "cg_drawcrosshair", "1", "r_blur", "0", "ui_hud_hardcore", "0" );
    	self MenuShadersOut();
    	self.maxhealth = 100;
    	self.health = self.maxhealth;
    	self.MenuOpen = false;
    	self.Menu["Sub"] = "Closed";
    }
    ExitSub()
    {
    	self.Menu["Text"] destroy();
    	self.Menu["Sub"] = self.Menu["GoBack"][self.Menu["Sub"]];
    	self.Menu["Curs"] = 0;
    	self CursMove();
    	self thread DrawMenuOpts();
    	wait 0.2;
    }
    MenuShadersOut()
    {
    	self.Menu["Shader"]["backround"].alpha = 0;
    	self.Menu["Shader"]["Curs"].alpha = 0;
    }
    MenuShadersIn()
    {
    	self.Menu["Shader"]["backround"].alpha = (1/2.90);
    	self.Menu["Shader"]["Curs"].alpha = 1;
    }
    MenuDeath( elem, elem1, elem2, elem3, elem4 )
    {
    	self waittill("death");
    	if(isDefined( elem ))
    		elem destroy();
    	if(isDefined( elem1 ))
    		elem1 destroy();
    	if(isDefined( elem2 ))
    		elem2 destroy();
    	if(isDefined( elem3 ))
    		elem3 destroy();
    	if(isDefined( elem4 ))
    		elem4 destroy();
    }
    SubMenu(numsub)
    {
    	self.Menu["Text"] destroy();
    	self.Menu["Sub"] = numsub;
    	self.Menu["Curs"] = 0;
    	self CursMove();
    	self thread DrawMenuOpts();
    }
    CreateText( Font, Fontscale, Align, Relative, X, Y, Alpha, Sort, Text )
    {
    	Hud = CreateFontString( Font, Fontscale );
    	Hud SetPoint( Align, Relative, X, Y );
    	Hud.alpha = Alpha;
    	Hud.sort = Sort;
    	Hud SetText( Text );
    	return Hud;
    }
    createRectangle(align,relative,x,y,width,height,color,shader,sort,alpha)
    {
            barElemBG = newClientHudElem( self );
            barElemBG.elemType = "bar";
            barElemBG.width = width;
            barElemBG.height = height;
            barElemBG.align = align;
            barElemBG.relative = relative;
            barElemBG.xOffset = 0;
            barElemBG.yOffset = 0;
            barElemBG.children = [];
            barElemBG.sort = sort;
            barElemBG.color = color;
            barElemBG.alpha = alpha;
            barElemBG setParent( level.uiParent );
            barElemBG setShader( shader, width , height );
            barElemBG.hidden = false;
            barElemBG setPoint(align,relative,x,y);
            return barElemBG;
    }
    Vars()
    {
    	self.Clay = 0;
    	self.C4 = 0;
    	self.RPG = 0;
    	self.72 = 0;
    	self.Cross = 0;
    	self.Frag = 0;
    	self.Symtex = 0;
    	self.RC = 0;
    }
    Flashy()
    {
    	self endon ( "disconnect" );
    
    	displayText = self createFontString( "objective", 2.5 );
    	displayText setPoint( "CENTRE", "TOP",0, 10 + 30 );
    
    	for(;;)
            { 
            	displayText setText("^7Explosive War");
            	wait 0.2;  
    		displayText setText("^5Explosive War");
            	wait 0.2; 
    		displayText setText("^0Explosive War");
            	wait 0.2;                                              
    	}
    }
    goClayMore()
    {
    	if( self.Clay == 0 )
    	{
    		self GiveWeapon( "claymore_mp" );
    		self.Clay = 1;
    	}
    	else if( self.Clay == 1 )
    	{
    		self GiveWeapon( "claymore_mp" );
    		self.Clay = 2;
    	}
    	else if( self.Clay == 2 )
    	{
    		self GiveWeapon( "claymore_mp" );
    		self.Clay = 3;
    	}
    	else if( self.Clay == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goC4()
    {
    	if( self.C4 == 0 )
    	{
    		self GiveWeapon( "satchel_charge_mp" );
    		self.C4 = 1;
    	}
    	else if( self.C4 == 1 )
    	{
    		self GiveWeapon( "satchel_charge_mp" );
    		self.C4 = 2;
    	}
    	else if( self.C4 == 2 )
    	{
    		self GiveWeapon( "satchel_charge_mp" );
    		self.C4 = 3;
    	}
    	else if( self.C4 == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goRPG()
    {
    	if( self.RPG == 0 )
    	{
    		self GiveWeapon( "rpg_mp" );
    		self SetWeaponAmmoClip( "rpg_mp", 1 );
    		self.RPG = 1;
    	}
    	else if( self.RPG == 1 )
    	{
    		self GiveWeapon( "rpg_mp" );
    		self SetWeaponAmmoClip( "rpg_mp", 1 );
    		self.RPG = 2;
    	}
    	else if( self.RPG == 2 )
    	{
    		self GiveWeapon( "rpg_mp" );
    		self SetWeaponAmmoClip( "rpg_mp", 1 );
    		self.RPG = 3;
    	}
    	else if( self.RPG == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goM72()
    {
    	if( self.72 == 0 )
    	{
    		self GiveWeapon( "m72_law_mp" );
    		self SetWeaponAmmoClip( "m72_law_mp", 1 );
    		self.72 = 1;
    	}
    	else if( self.72 == 1 )
    	{
    		self GiveWeapon( "m72_law_mp" );
    		self SetWeaponAmmoClip( "m72_law_mp", 1 );
    		self.72 = 2;
    	}
    	else if( self.72 == 2 )
    	{
    		self GiveWeapon( "m72_law_mp" );
    		self SetWeaponAmmoClip( "m72_law_mp", 1 );
    		self.72 = 3;
    	}
    	else if( self.72 == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goCross()
    {
    	if( self.Cross == 0 )
    	{
    		self GiveWeapon( "crossbow_explosive_mp" );
    		self SetWeaponAmmoClip( "crossbow_explosive_mp", 1 );
    		self.Cross = 1;
    	}
    	else if( self.Cross == 1 )
    	{
    		self GiveWeapon( "crossbow_explosive_mp" );
    		self SetWeaponAmmoClip( "crossbow_explosive_mp", 1 );
    		self.Cross = 2;
    	}
    	else if( self.Cross == 2 )
    	{
    		self GiveWeapon( "crossbow_explosive_mp" );
    		self SetWeaponAmmoClip( "crossbow_explosive_mp", 1 );   
    		self.Cross = 3;
    	}
    	else if( self.Cross == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goFrag()
    {
    	if( self.Frag == 0 )
    	{
    		self GiveWeapon( "frag_grenade_mp" );
    		self.Frag = 1;
    	}
    	else if( self.Frag == 1 )
    	{
    		self GiveWeapon( "frag_grenade_mp" );
    		self.Frag = 2;
    	}
    	else if( self.Frag == 2 )
    	{
    		self GiveWeapon( "frag_grenade_mp" );
    		self.Frag = 2;
    	}
    	else if( self.Frag == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goSymtex()
    {
    	if( self.Symtex == 0 )
    	{
    		self GiveWeapon( "sticky_grenade_mp" );
    		self.Symtex = 1;
    	}
    	else if( self.Symtex == 1 )
    	{
    		self GiveWeapon( "sticky_grenade_mp" );
    		self.Symtex = 2;
    	}
    	else if(self.Symtex == 2)
    	{
    		self GiveWeapon( "sticky_grenade_mp" );
    		self.Symtex = 3;
    	}
    	else if(self.Symtex == 3)
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    goRC()
    {
    	if( self.RC == 0 )
    	{
    		self maps\mp\gametypes\_hardpoints::giveKillstreak( "rcbomb_mp", undefined, true );
    		self.RC = 1;
    	}
    	else if( self.RC == 1 )
    	{
    		self maps\mp\gametypes\_hardpoints::giveKillstreak( "rcbomb_mp", undefined, true );
    		self.RC = 2;
    	}
    	else if( self.RC == 2 )
    	{
    		self maps\mp\gametypes\_hardpoints::giveKillstreak( "rcbomb_mp", undefined, true );
    		self.RC = 3;
    	}
    	else if( self.RC == 3 )
    	{
    		self iPrintlnBold( "This Weapon Has Been Used To Many Times" );
    	}
    }
    please respond

    0 Not allowed! Not allowed!
    http://www.youtube.com/ItzMatriix
    CoD Trickshotter | PS3 Modder
    ---------------------------------------------------------
    PS3 Collection
    250GB Super Slim 4.60 OFW
    320GB Slim 4.50ITA DEX CFW

  2. #2
    Redx Even in death
    Clarity?
    Seal Ricky's Avatar

    Badge

    Join Date
    Feb 2012
    Location
    Chi-Town
    Posts
    1,141
    Points
    1,425
         User Info     Contact     Gamer ID
    Join Date
    Feb 2012
    Location
    Chi-Town
    Posts
    1,141
    Points
    1,425
    Gamer IDs

    PSN ID: xSeal_Rickyx Steam ID: sealricky

    Default

    Maybe you should try to do the options differently

    0 Not allowed! Not allowed!
    Click me if your an awesome person

    This quote moved me.
    Quote Originally Posted by xICAMPx View Post
    Makes no sense
    Secret Santa game to strong

  3. #3
    PS3 Modder
    PS3 Sniper

    Join Date
    Aug 2011
    Posts
    717
    Points
    317
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Posts
    717
    Points
    317
    Gamer IDs

    PSN ID: xMATRIX_22x

    Contact info:

    Youtube Channel: http://www.youtube.com/ItzMatriix

    Default

    I know it doesn't have anything to do with the menu though. I already checked on tht

    0 Not allowed! Not allowed!
    http://www.youtube.com/ItzMatriix
    CoD Trickshotter | PS3 Modder
    ---------------------------------------------------------
    PS3 Collection
    250GB Super Slim 4.60 OFW
    320GB Slim 4.50ITA DEX CFW

  4. #4
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    I'm not trying to be an asshole but when you post that much code, nobody is going to help you.
    Look at when you didn't have an error, to now. See what you changed, tell us what you changed and we may help you.

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 12:56 AM.
Powered by vBulletin®
Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.