12.11.2015, 16:10
Hi, whats wrong with this command?
im getting this error
im getting this error
Код:
error 033: array must be indexed (variable "tmp")
pawn Код:
if(strcmp(cmd, "/seen", true)==0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] & ADMIN_WAR)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "{F7FF61}Usage:"COL_WHITE" /seen [full_name(case sensitive)]");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"%s%s.ini", USERS_PATH, tmp);
if(fexist(string))
{
format(string, sizeof(string), "%s last seen on %d of d d @ d:d", tmp, PlayerInfo[tmp][LastLoginDay],PlayerInfo[tmp][LastLoginMonth],PlayerInfo[tmp][LastLoginYear],PlayerInfo[tmp][LastLoginMinute],PlayerInfo[tmp][LastLoginHour]);
ABroadCast(COLOR_LIGHTRED,string,1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " That account name doesn't exist !");
}
}
else
{
SendClientMessage(playerid, GREY, AdminOnly);
}
}
return 1;
}