SA-MP Forums Archive
[Ajuda] Ajuda Erros - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ajuda Erros (/showthread.php?tid=457006)



Ajuda Erros - ThiagoMK - 08.08.2013

Galera me ajuda com esses erros:
pawn Код:
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(9) : error 017: undefined symbol "giveplayerid"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(10) : error 017: undefined symbol "giveplayerid"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(11) : error 017: undefined symbol "Autorizado"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(11) : error 017: undefined symbol "giveplayerid"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(11) : error 029: invalid expression, assumed zero
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(11) : fatal error 107: too many error messages on one line
As linhas sгo essas:
pawn Код:
if(sscanf(params,"u", giveplayerid)) return SendClientMessage(playerid,-1,"Use: /autorizartroca [ID]");
    if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid,-1,"Jogador nгo estб conectado.");
    if(Autorizado[giveplayerid] == true) return SendClientMessage(playerid,-1,"Jogador jб estб autorizado.");



Re: Ajuda Erros - darkxdll - 08.08.2013

antes do if(sscanf coloque isto :

pawn Код:
new giveplayerid;
E no topo do GM , coloque :
pawn Код:
new Bool: Autorizado[MAX_PLAYERS];



Re : Re: Ajuda Erros - ThiagoMK - 08.08.2013

Quote:
Originally Posted by darkxdll
Посмотреть сообщение
antes do if(sscanf coloque isto :

pawn Код:
new giveplayerid;
E no topo do GM , coloque :
pawn Код:
new bool: Autorizado[MAX_PLAYERS];
Agora deu esses erros:
pawn Код:
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(15) : error 012: invalid function call, not a valid address
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(15) : warning 215: expression has no effect
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(15) : error 001: expected token: ";", but found ")"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(15) : error 029: invalid expression, assumed zero
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(15) : fatal error 107: too many error messages on one line
Linha:
pawn Код:
format(string,sizeof(string),"{14E5FF}%s {FFFAFA}autorizou {14E5FF}%s {FFFAFA}a trocar seu nick!",PlayerName(playerid), PlayerName(giveplayerid));



Re: Ajuda Erros - darkxdll - 08.08.2013

Nгo й nessa linha , acho que й na linha anterior a esta , mesmo esta ai sendo a 15 , a 14 deve estar sem " ; " ou ")"


Re: Ajuda Erros - Don_Speed - 08.08.2013

Vocк esqueceu do ; na linha acima dessa !


Re : Ajuda Erros - ThiagoMK - 08.08.2013

A linha acima й essa:
pawn Код:
Autorizado[giveplayerid] = true;



Re: Ajuda Erros - darkxdll - 08.08.2013

Acho que sei o problema , lembra da variбvel "bool:Autorizado[MAX_PLAYERS];" que vocк criou ?
Coloque "Bool" antes do ":" , tem que ser com o "B" maiъsculo ,



Re : Ajuda Erros - ThiagoMK - 08.08.2013

Mesmo assim continua com erros
pawn Код:
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(13) : warning 213: tag mismatch
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(14) : warning 213: tag mismatch
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(16) : error 012: invalid function call, not a valid address
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(16) : warning 215: expression has no effect
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(16) : error 001: expected token: ";", but found ")"
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(16) : error 029: invalid expression, assumed zero
C:\Users\Analia\Desktop\BmcV2.0\pawno\include\PPC_PlayerCommands.inc(16) : fatal error 107: too many error messages on one line
Linhas:
pawn Код:
13
if(Autorizado[giveplayerid] == true) return SendClientMessage(playerid,-1,"Jogador jб estб autorizado.");
14
Autorizado[giveplayerid] = true;
16
format(string,sizeof(string),"{14E5FF}%s {FFFAFA}autorizou {14E5FF}%s {FFFAFA}a trocar seu nick!",PlayerName(playerid), PlayerName(giveplayerid));



Re: Ajuda Erros - BielCOP - 08.08.2013

Caso For para um servidor RPG este comando, eu recomendo o comando /renomear.

Vбrios jogadores as vezes nao querem mudar o nick e precisam, ou nao sabem e acabam bugando digitando - ou !

Portanto:

pawn Код:
CMD:renomear(playerid,params[])
{
    new ID,NewName[MAX_PLAYER_NAME];

    if(sscanf(params,"us",ID,NewName))
    {
        SendClientMessage(playerid,-1,"Use /renomear [id] [nome]");
        return 1;
    }
    if(IsPlayerConnected(ID))
    {
        SetPlayerName(ID,NewName);
    }
    return 1;
}



Re : Re: Ajuda Erros - ThiagoMK - 08.08.2013

Quote:
Originally Posted by BielCOP
Посмотреть сообщение
Caso For para um servidor RPG este comando, eu recomendo o comando /renomear.

Vбrios jogadores as vezes nao querem mudar o nick e precisam, ou nao sabem e acabam bugando digitando - ou !

Portanto:

pawn Код:
CMD:renomear(playerid,params[])
{
    new ID,NewName[MAX_PLAYER_NAME];

    if(sscanf(params,"us",ID,NewName))
    {
        SendClientMessage(playerid,-1,"Use /renomear [id] [nome]");
        return 1;
    }
    if(IsPlayerConnected(ID))
    {
        SetPlayerName(ID,NewName);
    }
    return 1;
}
Vlw biel vou usar esse sу vou colocar mais coisas..