Errors
#1

i need help with these errors -.-

here is the code

Код:
if(strcmp(cmd, "/food", true) == 0) {
	 if(IsSpawned[playerid] == 0) {
	 SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
   return 1;
   }
   if(InDerby[playerid] == 1) {
   SendClientMessage(playerid,COLOR_ERROR,"You cannot use this command while you are in the stadium");
   return 1;
   }
   if(gTeam[playerid] == TEAM_FOODDELIVERY) {
   SendClientMessage(playerid, COLOR_ERROR, "You are food delivery staff. You have to goto the shop to eat");
   return 1;
   }
   if(askedforfood[playerid] == 1) {
   SendClientMessage(playerid,COLOR_ERROR,"Command used recently... Please wait");
   return 1;
   }
   if (!GetPlayersInTeam(TEAM_FOODDELIVERY)) { // --------------------- LINE 289
   SendClientMessage(playerid,COLOR_ERROR,"Unable to locate any Food Delivery staff");
   return 1;
   }
	 for(new i=0;i<MAX_PLAYERS;i++)
	 {
   if(gTeam[i] == TEAM_FOODDELIVERY) {
   new pname[24];
   new current_zone;
   current_zone = player_zone[playerid];
   GetPlayerName(playerid, pname, 24);
   SendClientMessage(i, 0xA9A9A9AA, "|_Food Delivery Requested_|");
   format(string, sizeof(string), "%s(%d) has called for a food delivery. Location: %s",pname,playerid,zones[current_zone][zone_name]);
   SendClientMessage(i,COLOR_ROYALBLUE,string);
   SendClientMessage(playerid, 0xA9A9A9AA, "|_Food Delivery Called_|");
   SendClientMessage(playerid,COLOR_ROYALBLUE,"You have called for a food delivery");
   Wantsfood[playerid] =1;
   askedforfood[playerid] =1;
   }
   }
   return 1;
   }
and this are errors :

Код:
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Reality.pwn(289) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Reality.pwn(289) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Reality.pwn(289) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Reality.pwn(289) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\Server\gamemodes\Reality.pwn(289) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
any idea why i get this erors whit compileing

...

if u need any more infromations tell me and i will post...

ty
Reply
#2

And what does GetPlayersInTeam return ?
Reply
#3

Quote:
Originally Posted by dice7
And what does GetPlayersInTeam return ?
I dont understand what u mean ... but if i am right i must delete return 1; or what i must make ? to compile without errors
Reply
#4

Show your GetPlayersInTeam
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)