Error 033 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error 033 (
/showthread.php?tid=552966)
Error 033 -
maiky1499 - 27.12.2014
I'm adding a new command to my gamemode looks like that:
Код:
new CallSign[MAX_PLAYERS][256];
When doing the command /callsign:
Код:
format(CallSign[playerid], 256, "%s", params);
And to see the callsigns: /callsigns
Код:
foreach(Player, i)
{
if(PlayerInfo[playerid][pFac] == PlayerInfo[i][pFac])
{
if(PlayerInfo[i][pFacDuty] && IsAOfficer(i))
{
if(CallSign[i])
{
duty ++;
}
}
}
}
format(string, sizeof(string), "_______| On Duty Cops: %d |_______", duty);
SendClientMessage(playerid, COLOR_GREEN, string);
foreach(Player, i)
{
if(PlayerInfo[playerid][pFac] == PlayerInfo[i][pFac])
{
if(CallSign[i] && PlayerInfo[i][pFacDuty])
{
format(string, sizeof(string), "[%d] %s: %s", i, RPN(i), CallSign[i]);
SendClientMessage(playerid, COLOR_COP, string);
}
}
}
Basically I get the three 033 errors on the command callsigns about CallSign[i] three times shown three errors:
Код:
C:\Users\user\Desktop\Land of Role Play\gamemodes\LORP.pwn(14379) : error 033: array must be indexed (variable "CallSign")
C:\Users\user\Desktop\Land of Role Play\gamemodes\LORP.pwn(14392) : error 033: array must be indexed (variable "CallSign")
C:\Users\user\Desktop\Land of Role Play\gamemodes\LORP.pwn(14430) : error 033: array must be indexed (variable "CallSign")
Re: Error 033 -
maiky1499 - 27.12.2014
Nevermind. Done.