{POMOC}GM chat erori

Započeo runner, Mart 18, 2011, 16:16:35 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:Gta RP
Detaljan opis problema:Erori oko Gm chata
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

C:\Documents and Settings\Korisnik\Desktop\EDIT GTA RP\GTARP\gamemodes\gtarp.pwn(18698) : error 021: symbol already defined: "ABroadCast"
C:\Documents and Settings\Korisnik\Desktop\EDIT GTA RP\GTARP\gamemodes\gtarp.pwn(37130) : error 017: undefined symbol "GBroadCast"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Poslednja Izmena: Mart 18, 2011, 16:18:22 POSLE PODNE od alee

Cobra 11


//------------------------------------GMCHAT-----------------------------
   if(strcmp(cmd, "/gm", true) == 0)
      {
       if(IsPlayerConnected(playerid))
        {
           if(gPlayerLogged[playerid] == 0)
           {
               SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
               return 1;
           }
         GetPlayerName(playerid, sendername, sizeof(sendername));
         new length = strlen(cmdtext);
         while ((idx < length) && (cmdtext[idx] <= ' '))
         {
            idx++;
         }
         new offset = idx;
         new result[80];
         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
         {
            result[idx - offset] = cmdtext[idx];
            idx++;
         }
         result[idx - offset] = EOS;
         if(!strlen(result))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/gm [chat]");
            return 1;
         }
         if (PlayerInfo[playerid][pGameMaster] >= 1)
         {
         format(string, sizeof(string), "(( ** GameMaster ** %s: %s ))", sendername, result);
         OOCOff(COLOR_DBLUE,string);
         printf("%s", string);
         }
      }
      return 1;
   }

   if(strcmp(cmd, "/pomoc", true) == 0)
   {
       if(IsPlayerConnected(playerid))

       {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         format(string, 256, "%s je novi igrac i treba mu pomo&#263;", sendername);
         GBroadCast(COLOR_YELLOW,string,1);
         SendClientMessage(playerid, COLOR_YELLOW, "Prijava je poslana GameMastersima.");
       }
       return 1;
   }

ovako...

"ABroadCast" vec imas definirano. znaci ima 2. jedan obrisi...

a ovo drugo "GBroadCast" ces definirati ovako...ako mislis na gamemastere

kod "forwarda" dodaj ovakav code:

forward GBroadCast(color,const string[],level);

i na kraj skripte dodaj ovo:

public GBroadCast(color,const string[],level)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (PlayerInfo[i][pGameMaster] >= level)
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
return 1;
}


EDIT: i drugi puta koristi CODE kad ubacujes komande...
Poslednja Izmena: Mart 18, 2011, 16:45:54 POSLE PODNE od [NS]Michael

E Hvala napravio sam bio je problem do Gbroada stavio sam ABroad  a za ovaj  ABroad bio je 2 puta jedan sam izbriso uglavnom sad radi.
Hvala jos jednom.
Moze Lock! ;)