Szerző Téma: GetIpCounty Ladminba! 1error string already defined  (Megtekintve 1281 alkalommal)

GetIpCounty Ladminba! 1error string already defined
« Dátum: 2011. március 11. - 21:10:33 »
0 Show voters
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(770) : error 021: symbol already defined: \"string\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Error.

 

//729 sor! public OnPlayerConnect(playerid)
{
new //Kezdõdik a GetIpCountry Connect része
    MaxPlayers = GetMaxPlayers(),
    string[144],
    IP[16];
GetPlayerIp(playerid, IP, sizeof IP);
format(string, sizeof string, \"  {FFFF00}%s {00FF00}Csatlakozott a szerverhez.| {FFFFFF}Ország: {AAFFCC}%s|\", jatekosnev(playerid), GetIpCountry(IP));
for(new p; p < MaxPlayers; p++)
{
    if(!IsPlayerConnected(p) || p == playerid) continue;
    SendClientMessage(p, 0x00CEE23A, string);
}
format(string, sizeof string, \" %s IP Adress: %s |\", string, IP);
SendClientMessage(playerid, 0x00CEE23A, string);
//Vége a GetIpCountry Connect részének
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Registered] = 0;
PlayerInfo[playerid][God] = 0;
PlayerInfo[playerid][GodCar] = 0;
PlayerInfo[playerid][TimesSpawned] = 0;
PlayerInfo[playerid][Muted] = 0;
PlayerInfo[playerid][MuteWarnings] = 0;
PlayerInfo[playerid][Warnings] = 0;
PlayerInfo[playerid][Caps] = 0;
PlayerInfo[playerid][DoorsLocked] = 0;
PlayerInfo[playerid][pCar] = -1;
for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing] = 0;
PlayerInfo[playerid][spamCount] = 0;
PlayerInfo[playerid][spamTime] = 0;
PlayerInfo[playerid][PingCount] = 0;
PlayerInfo[playerid][PingTime] = 0;
PlayerInfo[playerid][FailLogin] = 0;
PlayerInfo[playerid][ConnectTime] = gettime();
//------------------------------------------------------
//770!!! sor: new PlayerName[MAX_PLAYER_NAME], string[128], str[128], file[256];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);

Nem elérhető tja

  • 107
    • Profil megtekintése
GetIpCounty Ladminba! 1error string already defined
« Válasz #1 Dátum: 2011. március 11. - 21:12:44 »
0 Show voters
2szer deklaráltad a stringet. Próbáld meg így:
 
//729 sor! public OnPlayerConnect(playerid)
{
new //Kezdõdik a GetIpCountry Connect része
    MaxPlayers = GetMaxPlayers(),
    IP[16];
GetPlayerIp(playerid, IP, sizeof IP);
format(string, sizeof string, \"  {FFFF00}%s {00FF00}Csatlakozott a szerverhez.| {FFFFFF}Ország: {AAFFCC}%s|\", jatekosnev(playerid), GetIpCountry(IP));
for(new p; p < MaxPlayers; p++)
{
    if(!IsPlayerConnected(p) || p == playerid) continue;
    SendClientMessage(p, 0x00CEE23A, string);
}
format(string, sizeof string, \" %s IP Adress: %s |\", string, IP);
SendClientMessage(playerid, 0x00CEE23A, string);
//Vége a GetIpCountry Connect részének
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Registered] = 0;
PlayerInfo[playerid][God] = 0;
PlayerInfo[playerid][GodCar] = 0;
PlayerInfo[playerid][TimesSpawned] = 0;
PlayerInfo[playerid][Muted] = 0;
PlayerInfo[playerid][MuteWarnings] = 0;
PlayerInfo[playerid][Warnings] = 0;
PlayerInfo[playerid][Caps] = 0;
PlayerInfo[playerid][DoorsLocked] = 0;
PlayerInfo[playerid][pCar] = -1;
for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing] = 0;
PlayerInfo[playerid][spamCount] = 0;
PlayerInfo[playerid][spamTime] = 0;
PlayerInfo[playerid][PingCount] = 0;
PlayerInfo[playerid][PingTime] = 0;
PlayerInfo[playerid][FailLogin] = 0;
PlayerInfo[playerid][ConnectTime] = gettime();
//------------------------------------------------------
//770!!! sor: new PlayerName[MAX_PLAYER_NAME], string[128], str[128], file[256];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);

GetIpCounty Ladminba! 1error string already defined
« Válasz #2 Dátum: 2011. március 11. - 21:22:55 »
0 Show voters
@Fernando Cortez Látom tudsz scriptelni :\'DDDD
 
//729 sor! public OnPlayerConnect(playerid)
{
   new //Kezdõdik a GetIpCountry Connect része
       MaxPlayers = GetMaxPlayers(),
       string[144],
       IP[16];
   GetPlayerIp(playerid, IP, sizeof IP);
   format(string, sizeof string, \"  {FFFF00}%s {00FF00}Csatlakozott a szerverhez.| {FFFFFF}Ország: {AAFFCC}%s|\", jatekosnev(playerid), GetIpCountry(IP));
   for(new p; p < MaxPlayers; p++)
   {
       if(!IsPlayerConnected(p) || p == playerid) continue;
       SendClientMessage(p, 0x00CEE23A, string);
   }
   format(string, sizeof string, \" %s IP Adress: %s |\", string, IP);
   SendClientMessage(playerid, 0x00CEE23A, string);
   //Vége a GetIpCountry Connect részének
   
   PlayerInfo[playerid][Deaths] = 0;
   PlayerInfo[playerid][Kills] = 0;
   PlayerInfo[playerid][Jailed] = 0;
   PlayerInfo[playerid][Frozen] = 0;
   PlayerInfo[playerid][Level] = 0;
   PlayerInfo[playerid][LoggedIn] = 0;
   PlayerInfo[playerid][Registered] = 0;
   PlayerInfo[playerid][God] = 0;
   PlayerInfo[playerid][GodCar] = 0;
   PlayerInfo[playerid][TimesSpawned] = 0;
   PlayerInfo[playerid][Muted] = 0;
   PlayerInfo[playerid][MuteWarnings] = 0;
   PlayerInfo[playerid][Warnings] = 0;
   PlayerInfo[playerid][Caps] = 0;
   PlayerInfo[playerid][DoorsLocked] = 0;
   PlayerInfo[playerid][pCar] = -1;
   for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing] = 0;
   PlayerInfo[playerid][spamCount] = 0;
   PlayerInfo[playerid][spamTime] = 0;
   PlayerInfo[playerid][PingCount] = 0;
   PlayerInfo[playerid][PingTime] = 0;
   PlayerInfo[playerid][FailLogin] = 0;
   PlayerInfo[playerid][ConnectTime] = gettime();
   //------------------------------------------------------
   //770!!! sor: new PlayerName[MAX_PLAYER_NAME], str[128], file[256];
   GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
   new tmp3[50]; GetPlayerIp(playerid,tmp3,50);

GetIpCounty Ladminba! 1error string already defined
« Válasz #3 Dátum: 2011. március 11. - 21:25:12 »
0 Show voters
Idézetet írta: Fernando Cortez date=1299874364\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6732\" data-ipsquote-contentclass=\"forums_Topic
2szer deklaráltad a stringet. Próbáld meg így:
 
//729 sor! public OnPlayerConnect(playerid)
{
new //Kezdõdik a GetIpCountry Connect része
    MaxPlayers = GetMaxPlayers(),
    IP[16];
GetPlayerIp(playerid, IP, sizeof IP);
format(string, sizeof string, \"  {FFFF00}%s {00FF00}Csatlakozott a szerverhez.| {FFFFFF}Ország: {AAFFCC}%s|\", jatekosnev(playerid), GetIpCountry(IP));
for(new p; p < MaxPlayers; p++)
{
    if(!IsPlayerConnected(p) || p == playerid) continue;
    SendClientMessage(p, 0x00CEE23A, string);
}
format(string, sizeof string, \" %s IP Adress: %s |\", string, IP);
SendClientMessage(playerid, 0x00CEE23A, string);
//Vége a GetIpCountry Connect részének
PlayerInfo[playerid][Deaths] = 0;
PlayerInfo[playerid][Kills] = 0;
PlayerInfo[playerid][Jailed] = 0;
PlayerInfo[playerid][Frozen] = 0;
PlayerInfo[playerid][Level] = 0;
PlayerInfo[playerid][LoggedIn] = 0;
PlayerInfo[playerid][Registered] = 0;
PlayerInfo[playerid][God] = 0;
PlayerInfo[playerid][GodCar] = 0;
PlayerInfo[playerid][TimesSpawned] = 0;
PlayerInfo[playerid][Muted] = 0;
PlayerInfo[playerid][MuteWarnings] = 0;
PlayerInfo[playerid][Warnings] = 0;
PlayerInfo[playerid][Caps] = 0;
PlayerInfo[playerid][DoorsLocked] = 0;
PlayerInfo[playerid][pCar] = -1;
for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing] = 0;
PlayerInfo[playerid][spamCount] = 0;
PlayerInfo[playerid][spamTime] = 0;
PlayerInfo[playerid][PingCount] = 0;
PlayerInfo[playerid][PingTime] = 0;
PlayerInfo[playerid][FailLogin] = 0;
PlayerInfo[playerid][ConnectTime] = gettime();
//------------------------------------------------------
//770!!! sor: new PlayerName[MAX_PLAYER_NAME], string[128], str[128], file[256];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
new tmp3[50]; GetPlayerIp(playerid,tmp3,50);

 


C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(735) : error 017: undefined symbol \"string\"
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(735) : error 017: undefined symbol \"string\"
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(739) : error 017: undefined symbol \"string\"
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(741) : error 017: undefined symbol \"string\"
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(741) : error 017: undefined symbol \"string\"
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(742) : error 017: undefined symbol \"string\"
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
6 Errors.

 
Na próba másikat
 
C:\\Documents and Settings\\Bluebay\\Dokumentumok\\Beérkezett fájlok\\ladmin4v2.pwn(774) : warning 217: loose indentation
Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase
 
1 Warning.

 
774 sor:
 
if(ServerInfo[ConnectMessages] == 1)

Nem elérhető tja

  • 107
    • Profil megtekintése
GetIpCounty Ladminba! 1error string already defined
« Válasz #4 Dátum: 2011. március 11. - 21:30:55 »
0 Show voters
igaz. Elnéztem xD
 
@Fernando Cortez Látom tudsz scriptelni :\'DDDD[/quote]
Ez most ironikus lenne?  ???

GetIpCounty Ladminba! 1error string already defined
« Válasz #5 Dátum: 2011. március 11. - 21:52:39 »
0 Show voters
Idézetet írta: TengeriMalac date=1299874975\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"6732\" data-ipsquote-contentclass=\"forums_Topic
@Fernando Cortez Látom tudsz scriptelni :\'DDDD
 
//729 sor! public OnPlayerConnect(playerid)
{
   new //Kezdõdik a GetIpCountry Connect része
       MaxPlayers = GetMaxPlayers(),
       string[144],
       IP[16];
   GetPlayerIp(playerid, IP, sizeof IP);
   format(string, sizeof string, \"  {FFFF00}%s {00FF00}Csatlakozott a szerverhez.| {FFFFFF}Ország: {AAFFCC}%s|\", jatekosnev(playerid), GetIpCountry(IP));
   for(new p; p < MaxPlayers; p++)
   {
       if(!IsPlayerConnected(p) || p == playerid) continue;
       SendClientMessage(p, 0x00CEE23A, string);
   }
   format(string, sizeof string, \" %s IP Adress: %s |\", string, IP);
   SendClientMessage(playerid, 0x00CEE23A, string);
   //Vége a GetIpCountry Connect részének
   
   PlayerInfo[playerid][Deaths] = 0;
   PlayerInfo[playerid][Kills] = 0;
   PlayerInfo[playerid][Jailed] = 0;
   PlayerInfo[playerid][Frozen] = 0;
   PlayerInfo[playerid][Level] = 0;
   PlayerInfo[playerid][LoggedIn] = 0;
   PlayerInfo[playerid][Registered] = 0;
   PlayerInfo[playerid][God] = 0;
   PlayerInfo[playerid][GodCar] = 0;
   PlayerInfo[playerid][TimesSpawned] = 0;
   PlayerInfo[playerid][Muted] = 0;
   PlayerInfo[playerid][MuteWarnings] = 0;
   PlayerInfo[playerid][Warnings] = 0;
   PlayerInfo[playerid][Caps] = 0;
   PlayerInfo[playerid][DoorsLocked] = 0;
   PlayerInfo[playerid][pCar] = -1;
   for(new i; i<PING_MAX_EXCEEDS; i++) PlayerInfo[playerid][pPing] = 0;
   PlayerInfo[playerid][spamCount] = 0;
   PlayerInfo[playerid][spamTime] = 0;
   PlayerInfo[playerid][PingCount] = 0;
   PlayerInfo[playerid][PingTime] = 0;
   PlayerInfo[playerid][FailLogin] = 0;
   PlayerInfo[playerid][ConnectTime] = gettime();
   //------------------------------------------------------
   //770!!! sor: new PlayerName[MAX_PLAYER_NAME], str[128], file[256];
   GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
   new tmp3[50]; GetPlayerIp(playerid,tmp3,50);

 

Köszönöm, ez megoldotta.
Zárom

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal