02.07.2018, 14:12
Code:
D:\SA-MP Servers\Test Server\gamemodes\Test.pwn(23346) : error 047: array sizes do not match, or destination array is too small Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
PHP Code:
CMD:stats(playerid,params[]) {
new player1;
if(sscanf(params,"i",player1)) {
new string[500],Registered1[10],LoggedIn1[10],AdminLevel1[10],h,m,s,pDeaths;
new Hour, Minute, Second; gettime(Hour, Minute, Second);
TotalGameTime(playerid, h, m, s);
if(PlayerInfo[playerid][Registered] == 1){Registered1 = "Yes";} else {Registered1 = "No";}
if(PlayerInfo[playerid][LoggedIn] == 1){LoggedIn1 = "Yes";} else {LoggedIn1 = "No";}
if(PlayerInfo[playerid][Hide] == 1){AdminLevel1 = "0";} else {AdminLevel1 = PlayerInfo[playerid][Level];} // <<< Line 23346
if(PlayerInfo[playerid][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[playerid][Deaths];
format(string,sizeof string,"{ff4d4d}Stats of %s\n\n{FFFFFF}Registered: %s\nLoggedIn: %s\nAdmin Level: %d\nScore: %d\nTime: %d hrs %d mins %d secs\nPing: %d\nCountry: %s\
\n\n{33AA33}Cash: $%d\nBank: $%d\n\n{FFFFFF}Skin: %d\nWanted level: %d\n\n{FFFF00}Kills and Deaths\n{FFFFFF}Kills: %d\nDeaths: %d\nRatio: %f",
pName(playerid),Registered1,LoggedIn1,AdminLevel1,GetPlayerScore(playerid),h,m,s,GetPlayerPing(playerid),GetPlayerCountryName(playerid),
GetPlayerMoney(playerid),PlayerInfo[playerid][Bank],GetPlayerSkin(playerid),GetPlayerWantedLevel(playerid),PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths],
Float:PlayerInfo[playerid][Kills]/Float:pDeaths);
return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Stats", string, "Ok","");
}
new string[500],Registered1[10],LoggedIn1[10],h,m,s,pDeaths;
new Hour, Minute, Second; gettime(Hour, Minute, Second);
TotalGameTime(player1, h, m, s);
if(PlayerInfo[player1][Registered] == 1){Registered1 = "Yes";} else {Registered1 = "No";}
if(PlayerInfo[player1][LoggedIn] == 1){LoggedIn1 = "Yes";} else {LoggedIn1 = "No";}
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
format(string,sizeof string,"{ff4d4d}Stats of %s\n\n{FFFFFF}Registered: %s\nLoggedIn: %s\nAdmin Level: %d\nScore: %d\nTime: %d hrs %d mins %d secs\nPing: %d\nCountry: %s\
\n\n{33AA33}Cash: $%d\nBank: $%d\n\n{FFFFFF}Skin: %d\nWanted level: %d\n\n{FFFF00}Kills and Deaths\n{FFFFFF}Kills: %d\nDeaths: %d\nRatio: %0.2f",
pName(player1),Registered1,LoggedIn1,PlayerInfo[player1][Level],GetPlayerScore(player1),h,m,s,GetPlayerPing(player1),GetPlayerCountryName(player1),
GetPlayerMoney(player1),PlayerInfo[player1][Bank],GetPlayerSkin(player1),GetPlayerWantedLevel(player1),PlayerInfo[player1][Kills],PlayerInfo[player1][Deaths],
Float:PlayerInfo[player1][Kills]/Float:pDeaths);
return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Stats", string, "Ok","");
}