Introducing MPGH's AIGA. The latest advancement in artificial intelligence. Click here now to learn more!
Results 1 to 7 of 7
  1. #1
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    823
    My Mood
    Amazed

    4D1 skidrow version GSC missing case statement.

    Hello mpgh!

    I was coding a sort of mod menu for 4D1 (four delta one) and i keep getting an error.
    Now the function 'checkKillstreak' needs an argument. and The function will check if the argument given is a killstreak.
    The switch statement checks if the arugment is equal to any of the strings below.
    But it keep saying missing case statement. here is the error:

    Code:
    ******* script compile error *******
    Howdy there, fella' - it seems you made a mistake!
    Error: missing case statement at file maps/mp/gametypes/_rank.gsc, line 97:
    }
    *
    
    ************************************
    And here isthe code it points at.
    (If you want the whole code for CHECKING then just response)


    Code:
    checkKillstreak(killname)
    {
    	switch(killname)
    	{
    		case "uav":
    			return true;
    		break;
    		
    		case "helicopter":
    			return true;
    		break;
    		
    		case "ac130":
    			return true;
    		break;
    		
    		case "predator_missile":
    			return true;
    		break;
    		
    		case "helicopter_minigun":
    			return true;
    		break;
    		
    		case "nuke":
    			return true;
    		break;
    		
    		case "counter_uav":
    			return true;
    		break;
    		
    		case "sentry":
    			return true;
    		break;
    		
    		case "airdrop":
    			return true;
    		break;
    		
    		case "helicopter_flares":
    			return true;
    		break;
    		
    		case "emp":
    			return true;
    		break;
    		
    		case "airdrop_mega":
    			return true;
    		break;
    		
    		case "stealth_airstrike":
    			return true;
    		break;
    		
    		case "harrier_airstrike":
    			return true;
    		break;
    		
    		case "tank":
    			return true;
    		break;
                    
                    default:
                            return false;
                    break;
    	}
    }
    
    checkEnter()
    {
    	self notifyOnPlayerCommand( "melee", "+melee" );
    	
    	for(;;)
    	{
    		self waittill("melee");
    		if( self thread checkKillstreak( self.menuText[self.scrollNum] ) )
    			self maps\mp\killstreaks\_killstreaks::giveKillstreak( self.menuText[self.scrollNum], true );
    	}
    }

    Thanks, Tim.

  2. #2
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    It says you are missing a closing bracket on line 97, it's kinda obvious.

    Post your whole code here: Pastebin.com - #1 paste tool since 2002! and I can take a closer look if you can't fix it.

    /Moved to MW3 GSC Help/Discussions


    The lines in my Steam are i's

  3. #3
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    823
    My Mood
    Amazed
    Quote Originally Posted by Nachos View Post
    It says you are missing a closing bracket on line 97, it's kinda obvious.

    Post your whole code here: Pastebin.com - #1 paste tool since 2002! and I can take a closer look if you can't fix it.

    /Moved to MW3 GSC Help/Discussions
    The code changed a littlebit. Error is now at line 85.

    #include common_scripts\utility; #include maps\mp\_utility; #include maps\mp\g - Pastebin.com
    Last edited by noobsludgerz; 07-07-2012 at 11:51 AM.

  4. #4
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    Quote Originally Posted by noobsludgerz View Post
    I can't see that there's anything wrong with line 97, can you try running the mod again and posting the new error message?


    The lines in my Steam are i's

  5. #5
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    823
    My Mood
    Amazed
    èrror message is the same just on line 85 this time.

  6. #6
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    Quote Originally Posted by noobsludgerz View Post
    èrror message is the same just on line 85 this time.
    Try this:


    It doesn't seem like it should be there.


    The lines in my Steam are i's

  7. #7
    noobsludgerz's Avatar
    Join Date
    Mar 2012
    Gender
    male
    Posts
    36
    Reputation
    10
    Thanks
    823
    My Mood
    Amazed
    Quote Originally Posted by Nachos View Post


    Try this:


    It doesn't seem like it should be there.
    This post can be closed i found a way around it
    I used submenus so i dont have to check if it is a killstreak it just Knows it's a killstreak (submenu = killstreaks )

    Thanks for the help Nachos!

Similar Threads

  1. [Solved] 4D1 skidrow version GSC : Static text.
    By noobsludgerz in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 07-14-2012, 06:33 AM
  2. zombie DLC skidrow version: I've got them all = awesome
    By lazert in forum Call of Duty Black Ops Help
    Replies: 4
    Last Post: 02-29-2012, 04:08 AM
  3. [Solved] Maps packs Skidrow Version?
    By kaumidani in forum Call of Duty Black Ops Help
    Replies: 4
    Last Post: 07-05-2011, 07:06 AM
  4. [Solved] First Strike DLC (cracked/Skidrow) Version 6
    By Marios666 in forum Call of Duty Black Ops Help
    Replies: 7
    Last Post: 05-20-2011, 07:10 PM
  5. Missing case statement - prolly something simple I dont see
    By Arasonic in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 9
    Last Post: 10-12-2010, 01:54 PM

Tags for this Thread