28.11.2012, 21:43
C:\Users\matt\Desktop\New folder (3)\gamemodes\larp.pwn(26330) : error 033: array must be indexed (variable "admintag")
C:\Users\matt\Desktop\New folder (3)\gamemodes\larp.pwn(26333) : error 048: array dimensions do not match
C:\Users\matt\Desktop\New folder (3)\gamemodes\larp.pwn(34767) : error 033: array must be indexed (variable "admintag")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
How do I fix it?
C:\Users\matt\Desktop\New folder (3)\gamemodes\larp.pwn(26333) : error 048: array dimensions do not match
C:\Users\matt\Desktop\New folder (3)\gamemodes\larp.pwn(34767) : error 033: array must be indexed (variable "admintag")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
pawn Код:
if(strcmp(cmd, "/setadmintag", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] <= 5) return SendClientMessage(playerid, COLOR_LIGHTRED, "* You need to be admin, to do this!");
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /setadmintag [Admin Name]");
SetPlayerName(playerid, tmp);
admintag[playerid] = 1;
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(offdutyname, 24, name);
SendClientMessage(playerid, COLOR_GREY, "* You have set your admin name!");
return 1;
}
return 1;
}
pawn Код:
if (admintag[playerid] == 1)
{
SetPlayerName(playerid, offdutyname[playerid]);
}