Raised This Month: $ Target: $400
 0% 

[ SOLVED] case


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
daniel46
Senior Member
Join Date: Dec 2011
Old 05-06-2013 , 06:15   [ SOLVED] case
Reply With Quote #1

i dont know what is the problem here

i got problem in the case

Code:
switch( GetUserItem( client ) )
	{
		case Laser: Players[ client ] [ Laser ] = true;
		
		case TimerFreeze: Players[ client ] [ TimerF ] = true;
		
		case SuperPunch: Players[ client ] [ LeeSinPunch ] = true;
		
		case Poisened: Players[ client ] [ Poisen ] = true;
	}

and here is the enum and new

Code:
enum _:ItemsInfo {
	Laser,
	TimerFreeze,
	SuperPunch,
	Poisened
};

new TheItem[ 33 ][ ItemsInfo ];
and the stock

Code:
stock GetUserItem( index )
{
	for( new i = 0 ; i < ItemsInfo ; i ++ )
	{
		if( TheItem[ index ][ i ] )
		{
			return i;
		}
	}
	return -1
}
and i didnt have any problem in the first 3 options but when i added the poisen its make in the case this lien Error

Error: Duplicate "case" label (value 3)
daniel46 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode