06.03.2019, 15:46
Hello i am having these errors while trying to compile.
The script parts.
More
Код:
C:\Users\Administrator\Desktop\BETA SERVER\gamemodes\PS.pwn(32450) : warning 202: number of arguments does not match definition C:\Users\Administrator\Desktop\BETA SERVER\gamemodes\PS.pwn(32453) : error 017: undefined symbol "TimeConvert" C:\Users\Administrator\Desktop\BETA SERVER\gamemodes\PS.pwn(32453) : error 033: array must be indexed (variable "ban_expire") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. Line :32450 BanExpire = cache_get_value_name(i, "BanExpire");
Код:
public OnBanLoad(playerid) // i think that why it wasnt working x? { new rows = cache_num_rows(); new string[128], name[24], BannedBy[24], BanReason[24], BanOn[24], BanExpire, Mainstring[800], ban_expire[68]; if(rows) { for(new i; i < rows; i++) { cache_get_value_name(i, "PlayerName", name); cache_get_value_name(i, "BannedBy", BannedBy); cache_get_value_name(i, "BanReason", BanReason); cache_get_value_name(i, "BanOn", BanOn);//fixeed How it was ccache iremvoed cok BanExpire = cache_get_value_name(i, "BanExpire"); if(BanExpire == 0) ban_expire = "PERMANENT"; else ban_expire = TimeConvert(BanExpire); format(string, sizeof(string),"%s / %s / %s / %s / %s\n", name, BannedBy, BanReason, BanOn, ban_expire); strcat(Mainstring, string); } ShowPlayerDialog(playerid, DIALOGS+5471, DIALOG_STYLE_LIST, "Banned Players", Mainstring, "Close", ""); } else ShowPlayerDialog(playerid, DIALOGS+5471, DIALOG_STYLE_MSGBOX, "Note", "{FF0000}No banned players found", "Close", ""); return 1; }
Код:
CMD:bans(playerid, params[]) { if(Info[playerid][Level] >= 4) { mysql_tquery(mysql, "SELECT * FROM `BannedPlayers`", "OnBanLoad", "i", playerid); //why?? return 1; } else return ShowMessage(playerid, red, 1); } CMD:bplayers(playerid, params[]) return cmd_bans(playerid, params);
Код:
forward OnBanLoad(playerid);