Quote:
Originally Posted by TwinkiDaBoss
PHP код:
public OnPlayerSpawn(playerid) {
SetPlayerRank(playerid);
return true;
}
SetPlayerRank(playerid) {
new rankname[24];
switch(rankname) {
case 0 .. 200: rankname = "Rank 1"; //if their score is from 0 to 200
case 201 .. 300: rankname = "Junior Killer"; //if their score is from 201 to 300
case 301 .. 400: rankname = "Senior Killer"; //if their score is from 301 to 400
default: rankname = "Master"; //if its anything else
}
return rankname[24];
}
|
I got this
How to fix ?
PHP код:
.pwn(280) : error 033: array must be indexed (variable "-unknown-")
.pwn(286) : error 032: array index out of bounds (variable "rankname")
.pwn(278) : warning 203: symbol is never used: "playerid"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase