Raised This Month: $51 Target: $400
 12% 

Solved Multiple definition in case


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 06-03-2017 , 12:57   Multiple definition in case
Reply With Quote #1

PHP Code:
switch(skill)
    {
        case 
.. 69fun_rank[client] = 1;
        case 
70 .. 74fun_rank[client] = 2;
        case 
75 .. 79fun_rank[client] = 3;
        case 
80 .. 84fun_rank[client] = 4;
        case 
85 .. 89fun_rank[client] = 5;
        case 
90 .. 94fun_rank[client] = 6;
        case 
95 .. 99fun_rank[client] = 7;
        case 
100 .. 104fun_rank[client] = 8;
        case 
105 .. 109fun_rank[client] = 9;
        case 
110 .. 114fun_rank[client] = 10;
        case 
115 .. 119fun_rank[client] = 11;
        case 
120 .. 124fun_rank[client] = 12;
        case 
125 .. 129fun_rank[client] = 13;
        case 
130 .. 134fun_rank[client] = 14;
        case 
135 .. 139fun_rank[client] = 15;
        case 
140 .. 144fun_rank[client] = 16;
        case 
145 .. 149fun_rank[client] = 17;
        case 
150 .. 1000fun_rank[client] = 18;
    }

E.g. this i ussing in AMXX but "great" SourceMod give me error
(1020) : error 001: expected token: ":", but found ".."
(1020) : warning 215: expression has no effect
(1020) : error 001: expected token: ";", but found ":"


How to this in SM?
__________________

Last edited by _GamerX; 06-04-2017 at 03:35.
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-03-2017 , 13:58   Re: Multiple definition in case
Reply With Quote #2

Number ranges for switch were removed from SM. Use if else.
__________________

Last edited by hleV; 06-03-2017 at 13:58.
hleV is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 06-03-2017 , 14:04   Re: Multiple definition in case
Reply With Quote #3

Or use math to determine their rank..?
Mitchell 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 19:25.


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