27.12.2014, 14:28
I'm adding a new command to my gamemode looks like that:
When doing the command /callsign:
And to see the callsigns: /callsigns
Basically I get the three 033 errors on the command callsigns about CallSign[i] three times shown three errors:
Код:
new CallSign[MAX_PLAYERS][256];
Код:
format(CallSign[playerid], 256, "%s", params);
Код:
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); } } }
Код:
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")