SA-MP Forums Archive
[Ajuda] Erros e um warning - 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] Erros e um warning (/showthread.php?tid=495560)



Erros e um warning - AdesxXx - 17.02.2014

Й do tutorial do Josma_cmd, na hora da compilaзгo estб dando os erros abaixo

Erros
pawn Код:
C:\Users\Administrador\Desktop\GM Ades\gamemodes\pGM.pwn(163) : warning 213: tag mismatch
C:\Users\Administrador\Desktop\GM Ades\gamemodes\pGM.pwn(722) : error 010: invalid function or declaration
C:\Users\Administrador\Desktop\GM Ades\gamemodes\pGM.pwn(724) : error 010: invalid function or declaration
C:\Users\Administrador\Desktop\GM Ades\gamemodes\pGM.pwn(730) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
Codigo da warning

pawn Код:
CMD:promover(playerid, params[])
{
    new PlayerB, cargo;
    if(sscanf(params, "dd", PlayerB, Cargo)) return SendClientMessage(playerid, 0x1E90FF99, "Uso correto: /Promover [id] [cargo]");
    if(ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid, 0x1E90FF99, "Vocк nгo й lнder");
    if(ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid, 0x1E90FF99, "Este jogador nгo й da mesma organizaзгo que vocк.");
    ProgressaoInfo[playerid][Cargo] = cargo;
    return true;
}
Dos erros

pawn Код:
if(dialogid == 100 && response)
    {
        ProgressaoInfo[playerid][Membro] = GetPVarInt(playerid, "OrgConvidado");
        ProgressaoInfo[playerid][Cargo] = 1; na nova organizaзгo.
        DeletePVar(playerid, "OrgConvidado");
        return true;
    }
Agradeзo quem poder ajudar


Re: Erros e um warning - OrNot - 17.02.2014

troque

PHP код:
CMD:promover(playeridparams[])
{
    new 
PlayerBcargo;
    if(
sscanf(params"dd"PlayerBCargo)) return SendClientMessage(playerid0x1E90FF99"Uso correto: /Promover [id] [cargo]");
    if(
ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid0x1E90FF99"Vocк nгo й lнder");
    if(
ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid0x1E90FF99"Este jogador nгo й da mesma organizaзгo que vocк.");
    
ProgressaoInfo[playerid][Cargo] = cargo;
    return 
true;

por

troque

PHP код:
CMD:promover(playeridparams[])
{
    new 
PlayerBcargo;
    if(
sscanf(params"dd"PlayerIBCargo)) return SendClientMessage(playerid0x1E90FF99"Uso correto: /Promover [id] [cargo]");
    if(
ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid0x1E90FF99"Vocк nгo й lнder");
    if(
ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid0x1E90FF99"Este jogador nгo й da mesma organizaзгo que vocк.");
    
ProgressaoInfo[playerid][Cargo] = cargo;
    return 
true;




Re: Erros e um warning - AdesxXx - 17.02.2014

@OrNot
os erros continuam..


Re: Erros e um warning - Wanderson_SAMP - 17.02.2014

Isso as vezes й falta de Vocк criar a array.

qual comando que "aciona" a dialogid ? o.O


Re: Erros e um warning - AdesxXx - 17.02.2014

Erros resolvidos

sobrou somente a warning

pawn Код:
C:\Users\Administrador\Desktop\GM Ades\gamemodes\pGM.pwn(163) : warning 213: tag mismatch
Linha

pawn Код:
if(sscanf(params, "dd", PlayerB, Cargo)) return SendClientMessage(playerid, 0x1E90FF99, "Uso correto: /Promover [id] [cargo]");
Codigo

pawn Код:
CMD:promover(playerid, params[])
{
    new PlayerB, cargo;
    if(sscanf(params, "dd", PlayerB, Cargo)) return SendClientMessage(playerid, 0x1E90FF99, "Uso correto: /Promover [id] [cargo]");
    if(ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid, 0x1E90FF99, "Vocк nгo й lнder");
    if(ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid, 0x1E90FF99, "Este jogador nгo й da mesma organizaзгo que vocк.");
    ProgressaoInfo[playerid][Cargo] = cargo;
    return true;
}



Re: Erros e um warning - Schocc - 17.02.2014

Cuide com o case sensitive. (cargo, Cargo).
Quote:

new PlayerB, Cargo;
if(sscanf(params, "dd", PlayerB, Cargo))




Re: Erros e um warning - Wanderson_SAMP - 17.02.2014

Aqui deu de boa.
pawn Код:
CMD:promover(playerid, params[])
{
    new PlayerB, cargo;
    if(sscanf(params,"dd", PlayerB, Cargo)) return SendClientMessage(playerid, 0x1E90FF99, "Uso correto: /Promover [id] [cargo]");
    if(ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid, 0x1E90FF99, "Vocк nгo й lнder");
    if(ProgressaoInfo[PlayerB][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid, 0x1E90FF99, "Este jogador nгo й da mesma organizaзгo que vocк.");
    ProgressaoInfo[playerid][Cargo] = cargo;
    return true;
}



Re: Erros e um warning - PT - 18.02.2014

pawn Код:
CMD:promover(playerid, params[])
{    
    if(sscanf(params,"dd", params[0], params[1])) return SendClientMessage(playerid, 0x1E90FF99, "Uso correto: /Promover [id] [cargo]");    
    if(ProgressaoInfo[playerid][Cargo] != 10) return SendClientMessage(playerid, 0x1E90FF99, "Vocк nгo й lнder");    
    if(ProgressaoInfo[params[0]][Membro] != ProgressaoInfo[playerid][Membro]) return SendClientMessage(playerid, 0x1E90FF99, "Este jogador nгo й da mesma organizaзгo que vocк.");    
    ProgressaoInfo[params[0]][Cargo] = params[1];    
    return true;
}