Help In Function
#1

pawn Код:
stock Rank(playerid)
{
    new Rankk[120];
    switch(GetPlayerScore(playerid))
    {
        case 0..10: Rankk = "Ex";
        case 10..50: Rankk = "Ex1";
        case 100..200: Rankk= "Ex2";
        case 200..300: Rankk = "Ex3";
        case 300..599: Rankk = "Ex4";
        default: Rankk = "Ex5";
    }
    return Rankk;
}
Example:

pawn Код:
CMD:rank2(playerid, params[])
{
        new string[128];
        format(string, sizeof(string),"Rank Test:%s",Rank(playerid));
        SendClientMessage(RED,playerid,string);
        return 1;
}
Error:
Код:
(208) : error 040: duplicate "case" label (value 10)
(210) : error 040: duplicate "case" label (value 200)
(211) : error 040: duplicate "case" label (value 300)
Reply


Messages In This Thread
Help In Function - by lordturhan - 17.02.2012, 18:52
Re: Help In Function - by Toreno - 17.02.2012, 18:53
Re: Help In Function - by lordturhan - 17.02.2012, 18:59
Re: Help In Function - by Toreno - 17.02.2012, 19:03
Re: Help In Function - by lordturhan - 17.02.2012, 19:04
Re: Help In Function - by johnnyman1 - 17.02.2012, 19:04
Re: Help In Function - by Konstantinos - 17.02.2012, 19:06
Re: Help In Function - by lordturhan - 17.02.2012, 19:08
Re: Help In Function - by lordturhan - 17.02.2012, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)