must be assigned to an array
#1

Hello, when i complied it shows that:
(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;
}

Please help me!!
Reply


Messages In This Thread
must be assigned to an array - by CoR3 - 27.09.2014, 06:34
Re: must be assigned to an array - by SickAttack - 27.09.2014, 06:36
Re: must be assigned to an array - by CoR3 - 27.09.2014, 06:45
Re: must be assigned to an array - by Ox1gEN - 27.09.2014, 07:55
Re: must be assigned to an array - by CoR3 - 28.09.2014, 06:13
Re: must be assigned to an array - by Alpha000 - 25.03.2016, 09:47

Forum Jump:


Users browsing this thread: 1 Guest(s)