19.04.2014, 20:48
Hello!!
For some reason when I compile my script, it gives me these errors:
Here is the whole Stats command:
Here's the PlayerInfo enum:
I am using Y_INI.
For some reason when I compile my script, it gives me these errors:
Код:
C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 022: must be lvalue (non-constant) C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : warning 215: expression has no effect C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : error 001: expected token: ";", but found "]" C:\Users\X\Desktop\X\gamemodes\X.pwn(530) : fatal error 107: too many error messages on one line
Код:
Line 530: Adminlevel = PlayerInfo[playerid][Adminlevel];
Код:
CMD:stats(playerid, params[]) { new sString[128]; Adminlevel = PlayerInfo[playerid][Adminlevel]; money = PlayerInfo[playerid][Money]; score = PlayerInfo[playerid][Score]; deaths = PlayerInfo[playerid][Deaths]; kills = PlayerInfo[playerid][Kills]; format(sString,sizeof(sString), "Admin Level: %d | Money: %d | Score: %d | Deaths: %d | Kills: %d", Adminlevel, money, score, deaths, kills); SendClientMessage(playerid, COLOR_ORANGE, sString); return 1; }
Код:
enum PlayerInfo { Pass[129], //User's password Adminlevel, //User's admin level Money, //User's money Score, //User's scores Kills, //User's kills Deaths //User's deaths }