Error!! error 021: symbol already defined -
Decist - 09.06.2009
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);
}
}
}
}
}
}
}
Re: Error!! error 021: symbol already defined -
steven_italy - 09.06.2009
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.
Re: Error!! error 021: symbol already defined -
Donny_k - 09.06.2009
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 ?
Re: Error!! error 021: symbol already defined -
Klutty - 09.06.2009
Quote:
Originally Posted by pawn-lang.pdf
021 symbol already defined: symbol
The symbol was already defined at the current level.
|
Re: Error!! error 021: symbol already defined -
Decist - 10.06.2009
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
Re: Error!! error 021: symbol already defined -
MenaceX^ - 10.06.2009
Owned, the 3rd topic I've been with this question.
Show me your includes.
(#include bla bla)
Re: Error!! error 021: symbol already defined -
Decist - 10.06.2009
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 Float
1x;
new Float
1y;
new Float
1z;
new Float
2x;
new Float
2y;
new Float
2z;
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);
}
}}}}}
}