Results 1 to 9 of 9
  1. #1
    Wii Coder
    ChumLee's Avatar

    Badge

    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    'Murica
    Posts
    5,383
    Points
    7,606
    Gamer IDs

    Gamertag: TERR0Rx9

    Contact info:

    Youtube Channel: http://www.youtube.com/user/HAXZingTERR0R

    Default [HELP] Error with my mod menu base.

    Disclaimer: Since this is just a prototype, there are only 3 options that do the same thing. If you are a good enough at modding, you would see where I'm trying to get with this scripting. I'm getting a "Script Compile Error: Unknown Function" notice when I use it though. If you can fix the error, you will get mega credits.

    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		player thread openMenu();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    
    		self thread MenuCycleMonitor();
    	}
    }
    
    openMenu()
    {
    	level endon( "map_restarting" );
    
    	for(;;)
    	{
    		self waittill( "meleeButtonPressed" );
    
    		if( self getStance() == "crouch" )
    		{
    			wait 0.50;
    		
    			if( self getStance() == "crouch" && self meleeButtonPressed() == true )
    			{
    				self thread startmenu();
    			}
    			else if( self getStance() != "crouch"  && meleeButtonPressed() == false )
    			{
    				self.inmenu = 0;	
    			}
    		}
    	}
    }
    
    startmenu()
    {
    	self.inmenu = 1;
    	self freezeControls( true );
    	self EnableInvulnerability();
    	self setClientUIVisibilityFlag( "hud_visible", 0 );
    	wait 0.01;
    	self thread menufunction();
    }
    
    MenuCycleMonitor()
    {
    	self.menuoption = 1;
    
    	if( self.inmenu == 1 && self FragButtonPressed() == true )
    	{
    		self.menuoption = self.menuoption + 1;
    		if( self.menuoption == 4 )
    		{
    			self.menuoption = 1;
    		}
    	}
    }
    
    menufunction()
    {
    	self endon( "disconnect" );
    
    	self setLowerMessage("Cycle: [{+frag}]\n\n" + self.option + "[{+activate}]\n\nExit[{+attack}]");
    
    	for(;;)
    	{
    		if( self.inmenu == 1 && self.menuoption == 1 )
    		{
    			self.option = "Suicide";
    			if( self UseButtonPressed() == true && self.menuoption == 1 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self.menuoption == 2 )
    		{
    			self.option = "Die";
    			if( self UseButtonPressed() == true && self.menuoption == 2 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self.menuoption == 3 )
    		{
    			self.option = "Kill Yourself";
    			if( self UseButtonPressed() == true && self.menuoption == 3 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self AttackButtonPressed() == true )
    		{
    			wait 0.25;
    			self thread nomenu();
    		}
    	}
    }
    
    nomenu()
    {
    	self.inmenu = 0;
    	self freezeControls( false );
    	self DisableInvulnerability();
    	self setClientUIVisibilityFlag( "hud_visible", 1 );
    	self clearLowerMessage( 0.5 );
    }
    
    commitSuicide()
    {
    	self suicide();
    }

    0 Not allowed! Not allowed!


  2. #2
    PSN:Muffin0406
    Don't Fuck With The Muffin
    MUFFIN's Avatar
    Join Date
    Aug 2011
    Location
    Huh? Were am I?
    Posts
    262
    Points
    383
         User Info     Contact     Gamer ID
    Join Date
    Aug 2011
    Location
    Huh? Were am I?
    Posts
    262
    Points
    383

    Contact info:

    Youtube Channel: Youtube.com/muffin040698

    Default

    idk but for a lucky guess.......hiddin menu?? lol im a n00b but i got that error when i loaded a menu and josh got that while loading nuketown survival idk y its dos that

    0 Not allowed! Not allowed!
    Last edited by MUFFIN; 07-06-2012 at 06:20 AM.
    Atheism: The belief of one less god than you.

  3. #3
    Blink 182 Give Me Boners mynameisjosh's Avatar
    Join Date
    Oct 2011
    Posts
    1,377
    Points
    3,107
         User Info     Contact     Gamer ID
    Join Date
    Oct 2011
    Posts
    1,377
    Points
    3,107
    Gamer IDs

    Gamertag: JennaTollzZ PSN ID: OmmNomNomNomNom-

    Default

    I don't see the menu being created at all in there..... But fuck it, what do I know.

    @MUFFIN, this is an error that is a lot more than a syntax checker or just a not closed curly brace. This is really deep in there.

    Ask tlpwnzer, cheesetoast might find it, or mordervonjuden. And if you can Jellyinjecter yeah....

    0 Not allowed! Not allowed!
    Quote Originally Posted by Insane.Dragon View Post
    I fucked a shark once.
    Quote Originally Posted by RED 58 View Post
    i like the sig but i hate russ...
    im seeing conflict here

  4. #4
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    I honestly dont see anything. Might be a spelling mistake or a mistake in another gsc.
    Not entirely sure.

    0 Not allowed! Not allowed!

  5. #5
    Tig O Bitties
    Grey's Avatar
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Candy Mountain
    Posts
    2,935
    Points
    2,964

    Contact info:

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

    Default

    Quote Originally Posted by HAXZing TERR0R View Post
    Code:
    #include common_scripts\utility;
    #include maps\mp\_airsupport;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    init()
    {
    	thread onPlayerConnect();
    	thread onPlayerConnected();
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill( "connecting", player );
    
    		player thread onPlayerSpawned();
    	}
    }
    
    onPlayerConnected()
    {
    	for(;;)
    	{
    		level waittill( "connected", player );
    
    		player thread openMenu();
    	}
    }
    
    onPlayerSpawned()
    {
    	for(;;)
    	{
    		self waittill( "spawned_player" );
    
    		self thread MenuCycleMonitor();
    	}
    }
    
    openMenu()
    {
    	level endon( "map_restarting" );
    
    	for(;;)
    	{
    		self waittill( "meleeButtonPressed" );
    
    		if( self getStance() == "crouch" )
    		{
    			wait 0.50;
    		
    			if( self getStance() == "crouch" && self meleeButtonPressed() == true )
    			{
    				self thread startmenu();
    			}
    			else if( self getStance() != "crouch"  && meleeButtonPressed() == false )
    			{
    				self.inmenu = 0;	
    			}
    		}
    	}
    }
    
    startmenu()
    {
    	self.inmenu = 1;
    	self freezeControls( true );
    	self EnableInvulnerability();
    	self setClientUIVisibilityFlag( "hud_visible", 0 );
    	wait 0.01;
    	self thread menufunction();
    }
    
    MenuCycleMonitor()
    {
    	self.menuoption = 1;
    
    	if( self.inmenu == 1 && self FragButtonPressed() == true )
    	{
    		self.menuoption = self.menuoption + 1;
    		if( self.menuoption == 4 )
    		{
    			self.menuoption = 1;
    		}
    	}
    }
    
    menufunction()
    {
    	self endon( "disconnect" );
    
    	self setLowerMessage("Cycle: [{+frag}]\n\n" + self.option + "[{+activate}]\n\nExit[{+attack}]");
    
    	for(;;)
    	{
    		if( self.inmenu == 1 && self.menuoption == 1 )
    		{
    			self.option = "Suicide";
    			if( self UseButtonPressed() == true && self.menuoption == 1 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self.menuoption == 2 )
    		{
    			self.option = "Die";
    			if( self UseButtonPressed() == true && self.menuoption == 2 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self.menuoption == 3 )
    		{
    			self.option = "Kill Yourself";
    			if( self UseButtonPressed() == true && self.menuoption == 3 )
    			{
    				self thread nomenu();
    				wait 0.25;
    				self thread commitSuicide();
    			}
    		}
    		else if( self.inmenu == 1 && self AttackButtonPressed() == true )
    		{
    			wait 0.25;
    			self thread nomenu();
    		}
    	}
    }
    
    nomenu()
    {
    	self.inmenu = 0;
    	self freezeControls( false );
    	self DisableInvulnerability();
    	self setClientUIVisibilityFlag( "hud_visible", 1 );
    	self clearLowerMessage( 0.5 );
    }
    
    commitSuicide()
    {
    	self suicide();
    }
    the area in red is the problem. it needs to be self meleeButtonPressed(); == false

    0 Not allowed! Not allowed!

  6. #6
    Banned
    Join Date
    May 2011
    Posts
    917
    Points
    1,182
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Posts
    917
    Points
    1,182

    Default

    G-Rey good idea on it but that's not the case. If so he swould have lots of errors.

    0 Not allowed! Not allowed!

  7. #7
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Quote Originally Posted by Grey View Post
    the area in red is the problem. it needs to be self meleeButtonPressed(); == false
    Thats bad syntax.
    Would just throw another error.

    0 Not allowed! Not allowed!

  8. #8
    Just say no to drugs hell nah I ain't listen Drugs's Avatar

    Badge

    Join Date
    Jun 2011
    Location
    /r/Pokmon
    Posts
    3,560
    Points
    2,712
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Location
    /r/Pokmon
    Posts
    3,560
    Points
    2,712
    Gamer IDs

    Gamertag: Spin Master PSN ID: xTiPToN_- Steam ID: xTipton

    Contact info:

    Youtube Channel: http://www.youtube.com/users/xTiPToN

    Default

    Terror makes mods?

    0 Not allowed! Not allowed!
    Not a drug addict.

    | Wiki | Site Problems | Soundcloud | MTV Artist Page |

    PM @Tony for free Netflix Accounts

  9. #9
    The Fire Within
    Winning!
    Notorious's Avatar
    Join Date
    May 2011
    Location
    Twilight Zone
    Posts
    2,053
    Points
    3,427
         User Info     Contact     Gamer ID
    Join Date
    May 2011
    Location
    Twilight Zone
    Posts
    2,053
    Points
    3,427
    Gamer IDs

    Gamertag: TehNotorious PSN ID: NOTORIOUS-ORTIZ

    Default

    Same thing tlpawnzer said. unknown function usually occurs when the script calls on something that doesn't exist, hence it being unknown. It's either spelling or a different gsc

    0 Not allowed! Not allowed!


    ^Thanks Renji for the awesome sig^

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 06:00 AM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.