27.09.2014, 06:34
Hello, when i complied it shows that:
(3625) : error 006: must be assigned to an array
(3625) -> PlayerInfo[targetid][pBannedFor] = reason;
Please help me!!
(3625) : error 006: must be assigned to an array
(3625) -> PlayerInfo[targetid][pBannedFor] = reason;
Quote:
CMD:ban(playerid, params[]) { if(Logged[playerid] == 1) { new string[128], targetid, reason[60]; if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, blanco, "{FF0000}ERROR:{FFFFFF} Usted no esta autorizado para usar este comando"); if(sscanf(params,"us[60]", targetid, reason)) return SendClientMessage(playerid, blanco, "Use:{FFFFFF} /ban [playerid] [RAZON]"); if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, blanco, "{FF0000}ERROR:{FFFFFF} El jugador no esta conectado."); if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, blanco, "{FF0000}ERROR:{FFFFFF} El jugador tiene un rango administrativo."); PlayerInfo[targetid][pBanned] = 1; format( PlayerInfo[targetid][pBannedFor], 20, "%s", reason ); PlayerInfo[targetid][pBannedFor] = reason; new Day, Month, Year; getdate(Year, Month, Day); format(string, sizeof(string), "BAN:{FFFFFF} %s ha sido baneado por %s", GetName(targetid), GetName(playerid)); SendClientMessageToAll(COLOR_RED, string); format(string, sizeof(string), "%s Banned - %04d/%02d/%02d", GetName(targetid), Year, Month, Day); Log("/CSW/Logs/ban.txt", string); GetPlayerIp(targetid, IP[playerid], 16); format(string, sizeof(string), "Player's IP:{FFFFFF} %s (/banip to ban it)", IP[playerid]); SendClientMessage(playerid, COLOR_RED, string); KickWithMessage(targetid, reason); } return 1; } |