SA-MP Forums Archive
[AJUDA] ERRO COPILAR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] ERRO COPILAR (/showthread.php?tid=156623)



[AJUDA] ERRO COPILAR - mateusppr - 23.06.2010

QUANDO EU COPILO APARECE ESSE ERRO!

Код:
C:\Users\mateus\Desktop\Vida-Rol Server\gamemodes\AmericanRol.pwn(15317) : warning 202: number of arguments does not match definition
C:\Users\mateus\Desktop\Vida-Rol Server\gamemodes\AmericanRol.pwn(15318) : warning 202: number of arguments does not match definition
C:\Users\mateus\Desktop\Vida-Rol Server\gamemodes\AmericanRol.pwn(53259) : error 021: symbol already defined: "NameTimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
LA NA LINHA 53259 TEM ISSO.
Код:
public NameTimer()
{
	for(new i = 0;i < MAX_PLAYERS;i++)
 	{
	 	if(IsPlayerConnected(i))
 		{
 			for(new q = 0;q < MAX_PLAYERS;q++)
 			{
				if(IsPlayerConnected(q))
				{
 					new Float:p1x;
					new Float:p1y;
					new Float:p1z;
					new Float:p2x;
					new Float:p2y;
					new Float:p2z;
					if(IsPlayerConnected(i) && IsPlayerConnected(q))
					{
						GetPlayerPos(i,p1x,p1y,p1z);
  					GetPlayerPos(q,p2x,p2y,p2z);
						if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x,p2y,p2z) < pdistance)
						{
							if(PlayerInfo[q][pMaskuse] != 1)
	  					{
								ShowPlayerNameTagForPlayer(i,q,1);
							}
	  				}
						else
						{
							ShowPlayerNameTagForPlayer(i,q,0);
						}
          }
        }
      }
    }
	}
}



Re: [AJUDA] ERRO COPILAR - russo666 - 23.06.2010

Isso й porque jб tens essa callback duas vezes. Apaga uma se forem iguais, se nгo forem, passa o que nгo for igual de uma para a outra e no fim apagas uma.

E os warnings porque й que nгo queres corrigir?


Re: [AJUDA] ERRO COPILAR - victorxd12 - 23.06.2010

forward NameTimer ();


Re: [AJUDA] ERRO COPILAR - russo666 - 23.06.2010

Quote:
Originally Posted by victorxd12
forward NameTimer ();
error 021: symbol already defined: "NameTimer"

Traduзгo: Jб estб definido em algum outro lugar, nгo estб a dizer que a callback precisa de um forward.