Code help
#1

pawn Код:
CMD:getteam(playerid, params[])
{
   new teamid;
   if(PInfo[playerid][Level] < 4) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");
   if(sscanf(params,"d",teamid) return SendClientMessage(playerid, 0xFF0000FF,"USAGE: /getteam [teamid]");
   for(new i = 0; i < MAX_PLAYERS; i++)
   {
   if(gTeam[i] == teamid)
   new player1;
   new Float:x, Float:Y, Float:Z;
   GetPlayerPos(playerid, X, Y, Z);
   SetPlayerPos(i, X+3, Y, Z);
   }
   new pname[24],dstring[124];
   GetPlayerName(playerid,pname,sizeof(pname));
   format(dstring, sizeof(dstring), "Administrator %s has teleported teamid %d ", pname, teamid);
   SendClientMessageToAll(blue, dstring);
   return 1;
}
I have that code but it gives me errors


pawn Код:
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1201) : error 001: expected token: ")", but found "return"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1205) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1205) : error 017: undefined symbol "player1"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1205) : warning 215: expression has no effect
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1207) : error 017: undefined symbol "X"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1208) : error 017: undefined symbol "X"
C:\Users\Bichan\Desktop\UKTDM\gamemodes\UKTDM.pwn(1206) : warning 203: symbol is never used: "x"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
Code help - by Biess - 30.09.2012, 10:11
Re: Code help - by newbienoob - 30.09.2012, 10:18
Re: Code help - by Biess - 30.09.2012, 10:20
Re: Code help - by RedJohn - 30.09.2012, 10:24
Re: Code help - by Biess - 30.09.2012, 10:24
Re: Code help - by RedJohn - 30.09.2012, 10:26
Re: Code help - by Biess - 30.09.2012, 10:26
Re: Code help - by RedJohn - 30.09.2012, 10:32
Re: Code help - by Biess - 30.09.2012, 10:35
Re: Code help - by RedJohn - 30.09.2012, 10:39

Forum Jump:


Users browsing this thread: 2 Guest(s)