Error!! error 021: symbol already defined
#1

error on compile heres the error: : error 021: symbol already defined: "NameTimer"

sorry but i dont know whats wrong

Код:
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);
						}
          }
        }
      }
    }
	}
}
Reply
#2

Use the button "FIND" in your Pawn Editor and find another line called "public NameTimer()"
You can't define the same 2 times. Find this line and unders this line put the code of the other line.
Reply
#3

You sure 'NameTimer' isn't a variable ?

Anyway why not use 'SetNameTagDrawDistance( F distance )' instead of all that code or is that the point, you only want it in certain situations ?
Reply
#4

Quote:
Originally Posted by pawn-lang.pdf
021 symbol already defined: symbol
The symbol was already defined at the current level.
Reply
#5

Quote:
Originally Posted by steven_italy
Use the button "FIND" in your Pawn Editor and find another line called "public NameTimer()"
You can't define the same 2 times. Find this line and unders this line put the code of the other line.
i did that but cant find it
Reply
#6

Owned, the 3rd topic I've been with this question.
Show me your includes.
(#include bla bla)
Reply
#7

i found this inside my morphinc.inc
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 Float1x;
new Float1y;
new Float1z;
new Float2x;
new Float2y;
new Float2z;
if(IsPlayerConnected(i) && IsPlayerConnected(q))
{
GetPlayerPos(i,p1x,p1y,p1z);
GetPlayerPos(q,p2x,p2y,p2z);
if(GetPointDistanceToPointExMorph(p1x,p1y,p1z,p2x, p2y,p2z) < pdistance)
{
ShowPlayerNameTagForPlayer(i,q,1);
}
else
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}}}}}
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)