error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
CMD:stats(playerid, parms[]) { if(IsPlayerConnected(playerid)) { new admin = PlayerInfo[playerid][pAdminLevel]; new VIP = PlayerInfo[playerid][pVIPLevel]; new money = PlayerInfo[playerid][pMoney]; new score = PlayerInfo[playerid][pScore]; new Deaths = PlayerInfo[playerid][pDeaths]; new Kills = PlayerInfo[playerid][pKills]; new Cookies = PlayerInfo[playerid][pCookies]; format(string1,sizeof string1, "{2BFF00}Admin: {FFFFFF}[$%d] |- {2BFF00}V.I.P: {FFFFFF}[$%d] |- {2BFF00}Money: {FFFFFF}[$%d] |- {2BFF00}Score: {FFFFFF}[%d] |- {2BFF00}Deaths: {FFFFFF}[%d] |- {2BFF00}Kills: {FFFFFF}[%d] |- {2BFF00}Cookies: {FFFFFF}[%d]", admin,vip,money,score,deaths,kills,cookies); format(stats,sizeof stats, "%s", string1); ShowPlayerDialog(playerid,998,DIALOG_STYLE_MSGBOX,"{01B6F7}ACCOUNT STATS{F5F5F5}:",stats,"OK",""); } return 1; }
enum PlayerInfo
{
Pass[129],
Adminlevel,
VIPlevel,
Money,
Scores,
Kills,
Cookies,
Deaths
}
//News
new pInfo[MAX_PLAYERS][PlayerInfo];
format(string1, sizeof(string1), "Admin Level: %d",PlayerInfo[playerid][pAdminLevel]); |
Hello, Im making a /STATS Command but its not work given me some errors... how to fix it
ERRORS: Код:
error 028: invalid subscript (not an array or too many subscripts): "PlayerInfo" warning 215: expression has no effect error 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line Код:
CMD:stats(playerid, parms[]) { if(IsPlayerConnected(playerid)) { new admin = PlayerInfo[playerid][pAdminLevel]; new VIP = PlayerInfo[playerid][pVIPLevel]; new money = PlayerInfo[playerid][pMoney]; new score = PlayerInfo[playerid][pScore]; new Deaths = PlayerInfo[playerid][pDeaths]; new Kills = PlayerInfo[playerid][pKills]; new Cookies = PlayerInfo[playerid][pCookies]; format(string1,sizeof string1, "{2BFF00}Admin: {FFFFFF}[$%d] |- {2BFF00}V.I.P: {FFFFFF}[$%d] |- {2BFF00}Money: {FFFFFF}[$%d] |- {2BFF00}Score: {FFFFFF}[%d] |- {2BFF00}Deaths: {FFFFFF}[%d] |- {2BFF00}Kills: {FFFFFF}[%d] |- {2BFF00}Cookies: {FFFFFF}[%d]", admin,vip,money,score,deaths,kills,cookies); format(stats,sizeof stats, "%s", string1); ShowPlayerDialog(playerid,998,DIALOG_STYLE_MSGBOX,"{01B6F7}ACCOUNT STATS{F5F5F5}:",stats,"OK",""); } return 1; } PHP код:
|
CMD:stats(playerid, parms[])
{
new stats[256];
if(IsPlayerConnected(playerid))
{
new admin = pInfo[playerid][AdminLevel];
new vip = pInfo[playerid][VIPLevel];
new money = pInfo[playerid][Money];
new score = pInfo[playerid][Score];
new deaths = pInfo[playerid][Deaths];
new kills = pInfo[playerid][Kills];
new cookies = pInfo[playerid][Cookies];
format(stats,sizeof(stats), "{2BFF00}Admin: {FFFFFF}[$%i] |- {2BFF00}V.I.P: {FFFFFF}[$%i] |- {2BFF00}Money: {FFFFFF}[$%i] |- {2BFF00}Score: {FFFFFF}[%i] |- {2BFF00}Deaths: {FFFFFF}[%i] |- {2BFF00}Kills: {FFFFFF}[%i] |- {2BFF00}Cookies: {FFFFFF}[%i]", admin,vip,money,score,deaths,kills,cookies);
ShowPlayerDialog(playerid,998,DIALOG_STYLE_MSGBOX,"{01B6F7}ACCOUNT STATS{F5F5F5}:",stats,"OK","");
}
return 1;
}
CMD:stats(playerid, params[])
{
new string1[128];
if(IsPlayerConnected(playerid))
{
new admin = PlayerInfo[playerid][pAdminLevel];
new VIP = PlayerInfo[playerid][pVIPLevel];
new money = PlayerInfo[playerid][pMoney];
new score = PlayerInfo[playerid][pScore];
new Deaths = PlayerInfo[playerid][pDeaths];
new Kills = PlayerInfo[playerid][pKills];
new Cookies = PlayerInfo[playerid][pCookies];
format(string1, sizeof(string1), "{2BFF00}Admin: {FFFFFF}[$%d] \n|- {2BFF00}V.I.P: {FFFFFF}[$%d] \n|- {2BFF00}Money: {FFFFFF}[$%d] \n|- {2BFF00}Score: {FFFFFF}[%d] \n|- {2BFF00}Deaths: {FFFFFF}[%d] \n|- {2BFF00}Kills: {FFFFFF}[%d] \n|- {2BFF00}Cookies: {FFFFFF}[%d]", admin,vip,money,score,deaths,kills,cookies);
ShowPlayerDialog(playerid,998,DIALOG_STYLE_MSGBOX,"{01B6F7}ACCOUNT STATS{F5F5F5}:",string1,"OK","");
}
return 1;
}
CMD:stats(playerid, params[])
{
new string1[128];
if(IsPlayerConnected(playerid))
format(string1, sizeof(string1), "{2BFF00}Admin: {FFFFFF}[$%d] \n|- {2BFF00}V.I.P: {FFFFFF}[$%d] \n|- {2BFF00}Money: {FFFFFF}[$%d] \n|- {2BFF00}Score: {FFFFFF}[%d] \n|- {2BFF00}Deaths: {FFFFFF}[%d] \n|- {2BFF00}Kills: {FFFFFF}[%d] \n|- {2BFF00}Cookies: {FFFFFF}[%d]", PlayerInfo[playerid][pAdminLevel],PlayerInfo[playerid][pVIPLevel],PlayerInfo[playerid][pMoney],PlayerInfo[playerid][pScore],PlayerInfo[playerid][pDeaths],PlayerInfo[playerid][pKills],PlayerInfo[playerid][pCookies]);
ShowPlayerDialog(playerid,998,DIALOG_STYLE_MSGBOX,"{01B6F7}ACCOUNT STATS{F5F5F5}:",string1,"OK","");
return 1;
}