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);
(row_idx, const column_name[], destination[], max_len = sizeof(destination)) |
cache_get_value_name(row_idx, const column_name[], destination[], max_len = sizeof(destination))
BanExpire = cache_get_value_name(i, "BanExpire");
cache_get_value_name(i, "BanExpire", BanExpire);
if(BanExpire == 0) ban_expire = "PERMANENT"; else ban_expire = TimeConvert(BanExpire);
if(BanExpire == 0) format(ban_expire, sizeof(ban_expire), "PERMANENT"); else format(ban_expire, sizeof(ban_expire), TimeConvert(BanExpire));
error 017: undefined symbol "TimeConvert"
C:\Users\Administrator\Desktop\BETA SERVER\gamemodes\PS.pwn(32576) : error 035: argument type mismatch (argument 3) C:\Users\Administrator\Desktop\BETA SERVER\gamemodes\PS.pwn(32579) : error 017: undefined symbol "TimeConvert"
new TimeConvert