Raised This Month: $32 Target: $400
 8% 

[SOLVED] Why is this break; out of context?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 05-25-2010 , 01:37   [SOLVED] Why is this break; out of context?
Reply With Quote #1

Code:
public client_killed( iVictim, iAttacker, shouldgib ) {     g_Parasited[iVictim] = false;     if(is_alien(iAttacker))     {         Achievement_2(iAttacker);                 new weaponid = -1;         ns_get_weapon(iAttacker,weaponid);                         switch(ns_get_class(iAttacker))         {             case CLASS_GORGE:             {                 if(weaponid == WEAPON_SPIT) Achievement_5(iAttacker);                 break;             }                         case CLASS_FADE:             {                 if(weaponid == WEAPON_SWIPE) Achievement_4(iAttacker);                 break;             }         }     } }

Wtf? I have always had to put break's in case's before to prevent it from going down the line, now it tells me they are out of context? Am I missing something here?...
or am I thinking about php?
__________________


Last edited by mysticssjgoku4; 05-25-2010 at 02:41.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 05-25-2010 , 01:41   Re: Why is this break; out of context?
Reply With Quote #2

Pawn doesn't use them.
SnoW is offline
Send a message via MSN to SnoW
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 05-25-2010 , 01:52   Re: Why is this break; out of context?
Reply With Quote #3

Must be php then, thanks lol...
__________________

mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-25-2010 , 02:00   Re: Why is this break; out of context?
Reply With Quote #4

Quote:
Originally Posted by mysticssjgoku4 View Post
Must be php then, thanks lol...
Yep, PHP does that. It always confuses me when I haven't used PHP for awhile.
__________________
fysiks is offline
Reply



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 02:32.


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