GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: BoSS - 2012. augusztus 21. - 20:15:53

Cím: 1 error
Írta: BoSS - 2012. augusztus 21. - 20:15:53
Sziasztok van egy errorom és nem tudom mi a gond.
 
C:\\DOCUME~1\\RENDSZ~1\\LOCALS~1\\Temp\\Rar$DI02.281\\teszt.pwn(43811) : error 021: symbol already defined: \"NameTimer\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 
Ez a 43811.sor
 
{

 
Az egész kód pedig ez:
 
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);
            }
                    }
                }
            }
        }
    }
}

 
Elõre is köszi a helpet.
Cím: 1 error
Írta: lackos888 - 2012. augusztus 21. - 20:25:17
A NameTimer funkció, vagy változó már létezik.
Cím: 1 error
Írta: ZyZu. - 2012. augusztus 21. - 21:02:40
Ha nem találnád ezt nézd mert benne van http://forum.sa-mp.com/showthread.php?t=255114
Cím: 1 error
Írta: _I[TM]I_Dexter[CL] - 2012. augusztus 24. - 00:11:47
Ezzel az a baj hogy már létre van hozva 1 olyan.
Csináld azt h adj neki más nevet..
Ha segített np ;)
Dexter
Cím: 1 error
Írta: lackos888 - 2012. augusztus 24. - 05:04:31
Próbáld más néven használni a funkciót, például NameTimer2.
Cím: 1 error
Írta: _I[TM]I_Dexter[CL] - 2012. augusztus 24. - 07:06:16
Idézetet írta: lackos888 date=1345777471\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"26600\" data-ipsquote-contentclass=\"forums_Topic
Próbáld más néven használni a funkciót, például NameTimer2.
 
Vagy akár TimerNev2222 :D
Tök mindegy, csak ne NameTimer legyen, mert már olyan van definálva/létrehozva. ;)
Dexter
Cím: 1 error
Írta: Tomee - 2012. augusztus 24. - 14:43:26
szerintem ez a larp mod igaz? Régen nekem is az volt a bajom. Ez nem hiányzik belõle?
 
forward NameTimer();
Cím: 1 error
Írta: ZyZu. - 2012. augusztus 24. - 17:39:02
Idézetet írta: Tomee date=1345812206\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"26600\" data-ipsquote-contentclass=\"forums_Topic
szerintem ez a larp mod igaz? Régen nekem is az volt a bajom. Ez nem hiányzik belõle?
 
forward NameTimer();

 

Nem csak a LARP RPG módjában van ez a függvény vagy ez a forward..
Cím: 1 error
Írta: Bereczki - 2012. augusztus 24. - 21:00:14
public NameTimer12()
{
        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);
                                                }
                    }
                }
            }
        }
    }
}

 
és amelyik parancs vagy bármi egyéb ezt használná ott is írd utána a 12es-t a NameTimer-nek. Ennyi