04.05.2014, 12:37
Hey guys, I've made the a stats command of my won, just to incase I got some errors and I really got confused how to fix it.
Those the errors Im getting
Line 860:
My Player Info:
Thanks for anyone who can help me, I will really apprcieate it.
PHP код:
CMD:stats(playerid, params[])
{
new string[200];
format(string, sizeof(string), "Name: %s | ID: %d | Score: %d | Kills: %i | Deaths: %i | Money: %d | Adminlevel: %d", GetName(playerid), playerid, GetPlayerScore(playerid), PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], GetPlayerMoney(playerid), AdminLevel[playerid]);
SendClientMessage(playerid ,COLOR_WHITE, string);
return 1;
}
Код HTML:
C:\Users\бгйчд\Desktop\RolePlay Server\gamemodes\RolePlay.pwn(860) : error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" C:\Users\бгйчд\Desktop\RolePlay Server\gamemodes\RolePlay.pwn(860) : warning 215: expression has no effect C:\Users\бгйчд\Desktop\RolePlay Server\gamemodes\RolePlay.pwn(860) : error 001: expected token: ";", but found "]" C:\Users\бгйчд\Desktop\RolePlay Server\gamemodes\RolePlay.pwn(860) : error 029: invalid expression, assumed zero C:\Users\бгйчд\Desktop\RolePlay Server\gamemodes\RolePlay.pwn(860) : fatal error 107: too many error messages on one line
PHP код:
format(string, sizeof(string), "Name: %s | ID: %d | Score: %d | Kills: %i | Deaths: %i | Money: %d | Adminlevel: %d", GetName(playerid), playerid, GetPlayerScore(playerid), PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], GetPlayerMoney(playerid), AdminLevel[playerid]);
PHP код:
enum PlayerInfo
{
Pass[129], //User's password
Adminlevel, //User's admin level
VIPlevel, //User's vip level
Money, //User's money
Scores, //User's scores
Kills, //User's kills
Deaths //User's deaths
}