20.09.2016, 15:17
pawn Код:
CMD:viewfines(playerid, params[])
{
if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
new am, string[128], totalamount;
if(!IsPlayerInRangeOfPoint(playerid, 3.0, 3087.7048,-1779.4196,1525.7856))return SendClientMessage(playerid, COLOUR_GREY, "You must be at the town hall to pay fines.");
for(new x = 1; x < MAX_FINES; x++)
{
if(PlayerFined[FineID[x]] == PlayerSQLID[playerid])
{
am++;
totalamount += FineAmount[FineID[x]];
}
}
if(am == 0)return SendClientMessage(playerid, COLOUR_GREY, "You do not have any outstanding fines.");
format(string, sizeof(string), "Pay All Fines: "COL_RED"$%s\n"COL_WHITE"Pay Individual Fine", AddCommas(totalamount));//errorline
ShowPlayerDialog(playerid, DIALOG_FINES, DIALOG_STYLE_LIST, "Fines", string, "Select","Exit");//error line
return 1;
}
Код:
[16:41:35] [debug] Server crashed while executing BCRP_MYSQL.amx [16:41:35] [debug] AMX backtrace: [16:41:35] [debug] #0 native format () from samp03svr [16:41:35] [debug] #1 000e35b8 in public cmd_viewfines () at C:\Users\Grant\Dropbox\Bone County Roleplay\gamemodes\BCRP_MYSQL.pwn:11704 [16:41:35] [debug] #2 native CallLocalFunction () from samp03svr [16:41:35] [debug] #3 00000bb8 in public OnPlayerCommandText (playerid=1, cmdtext[]=@010d67e8 "/viewfines") at C:\Users\Grant\Dropbox\Bone County Roleplay\pawno\include\zcmd.inc:102