SA-MP Forums Archive
Simbol already Defined? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Simbol already Defined? (/showthread.php?tid=124454)



Simbol already Defined? - Rickzor14 - 30.01.2010

public NameTimer ()
/\ Line

44513) : error 021: symbol already defined: "NameTimer"
/\ Error

Theres only one ''NameTimer'' In my Pawno.

How to fix?


Re: Simbol already Defined? - Joe Staff - 30.01.2010

Show us everyline where the word NameTimer is.


Re: Simbol already Defined? - Rickzor14 - 30.01.2010

Its only here:
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)
{
if(PlayerInfo[q][pMaskuse] != 1)
{
ShowPlayerNameTagForPlayer(i,q,1);
}
}
else
{
ShowPlayerNameTagForPlayer(i,q,0);
}
}
}
}
}
}
}


Re: Simbol already Defined? - Joe Staff - 30.01.2010

Well how about the settimer used to run NameTimer? Hit ctrl+f and search for all NameTimers and post them


Re: Simbol already Defined? - Rickzor14 - 30.01.2010

I did that, There is only one NameTimer in it..


Re: Simbol already Defined? - Joe Staff - 30.01.2010

then add
forward NameTimer();

and that thing won't run because you don't have a timer hooked up to it.


Re: Simbol already Defined? - MadeMan - 30.01.2010

You probably have it defined in one of your includes.


Re: Simbol already Defined? - Kinetic - 30.01.2010

Quote:
Originally Posted by MadeMan
You probably have it defined in one of your includes.
yeah, a lot of people have problems because they do not know that you cannot repeat variables in their includes.