[ajuda] ajudo com esse warning ?
#1

Код:
C:\Documents and Settings\Administrador\Meus documentos\Downloads\Samp\LEORPG\gamemodes\LeORPG.pwn(2527) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           7924 bytes
Code size:          1364212 bytes
Data size:          5306020 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6694540 bytes

1 Warning.
ao warning
pawn Код:
stock IsPlayerOnline(name[])
{
    new PlayerName[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetPlayerName(i, PlayerName, sizeof(PlayerName));
        if(strcmp(name,PlayerName,true)==0)
        {
            return 1;
        }
    }
    return 0;
}
ajuda ai galera ?
Reply
#2

Tenta:
pawn Код:
stock IsPlayerOnline(name[])
{
    new pName[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetpName(i, pName, sizeof(pName));
        if(strcmp(name,pName,true)==0)
        {
            return 1;
        }
    }
    return 0;
}
Reply
#3

Код:
stock IsPlayerOnline( playerid )
{
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
          new nome[ MAX_PLAYER_NAME ];
          GetPlayerName( i, nome, sizeof( nome ) );
    }
    return nome;
}
Reply
#4

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Tenta:
pawn Код:
stock IsPlayerOnline(name[])
{
    new pName[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetpName(i, pName, sizeof(pName));
        if(strcmp(name,pName,true)==0)
        {
            return 1;
        }
    }
    return 0;
}
Код:
C:\Documents and Settings\Administrador\Meus documentos\Downloads\Samp\LEORPG\gamemodes\LeORPG.pwn(2530) : error 017: undefined symbol "GetpName"
C:\Documents and Settings\Administrador\Meus documentos\Downloads\Samp\LEORPG\gamemodes\LeORPG.pwn(2530) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

GetpName

GetPlayerName
Reply
#6

Quote:
Originally Posted by L.D.K
Посмотреть сообщение
Код:
C:\Documents and Settings\Administrador\Meus documentos\Downloads\Samp\LEORPG\gamemodes\LeORPG.pwn(2530) : error 017: undefined symbol "GetpName"
C:\Documents and Settings\Administrador\Meus documentos\Downloads\Samp\LEORPG\gamemodes\LeORPG.pwn(2530) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Sorry, tenta:
pawn Код:
stock IsPlayerOnline(name[])
{
    new pName[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetPlayerName(i, pName, sizeof(pName));
        if(strcmp(name,pName,true)==0)
        {
            return 1;
        }
    }
    return 0;
}

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
GetpName

GetPlayerName
Exato '-'
Reply
#7

Tenta esse:

pawn Код:
stock IsPlayerOnline(name[])
{
    new PlayerName2[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerName(i, PlayerName2, sizeof(PlayerName2));
            if(strcmp(name,PlayerName2,true)==0)
            {
                return true;
            }
        }
    }
    return 0;
}

Tenta esse que vai dar certo!!

Reply
#8

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Sorry, tenta:
pawn Код:
stock IsPlayerOnline(name[])
{
    new pName[MAX_PLAYER_NAME];
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        GetPlayerName(i, pName, sizeof(pName));
        if(strcmp(name,pName,true)==0)
        {
            return 1;
        }
    }
    return 0;
}



Exato '-'
deu cer to vlw ai galera ai repu pro ceis ai !!
Reply
#9

Quote:
Originally Posted by L.D.K
Посмотреть сообщение
deu cer to vlw ai galera ai repu pro ceis ai !!
De nada .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)