SA-MP Forums Archive
[AJUDA] ajuda com /relatorio - 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 com /relatorio (/showthread.php?tid=324499)



[AJUDA] ajuda com /relatorio - kaastiel - 09.03.2012

Olб eu criei o codigo pra um de /relatorio mais deu alguns erros e alguns warnings na horas de compilar:

Код:
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : error: 017: undefined symbol "relatorio"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : error: 017: undefined symbol "sscanf"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 219: local variable "string" shadows a variable at a preceding level
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 225: unreachable code
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 203: symbol is never used: "CMD""
E as linhas do erro sгo:

Код:
 CMD:relatorio(playerid, params[])
{
    new relato[128];
    if(sscanf(params, "s", relato))
        return SendClientMessage(playerid, COR_ADMIN, "Use /relatorio [texto]");

    new string[128], Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, sizeof(string), "Relatorio - [id: %d] %s relatou: %s", playerid, Nome, relato);
    ABroadCast(-1, string, 1);
    SendClientMessage(playerid, -1, "[BZC] Relatorio enviado com sucesso!! Aguarde o atendimento !.");
    return 1;
}



Re : [AJUDA] ajuda com /relatorio - steeldark - 09.03.2012

Quote:
Originally Posted by kaastiel
Посмотреть сообщение
Olб eu criei o codigo pra um de /relatorio mais deu alguns erros e alguns warnings na horas de compilar:

Код:
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : error: 017: undefined symbol "relatorio"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : error: 017: undefined symbol "sscanf"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 219: local variable "string" shadows a variable at a preceding level
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 225: unreachable code
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(14079) : warning: 203: symbol is never used: "CMD""
E as linhas do erro sгo:

Код:
 CMD:relatorio(playerid, params[])
{
    new relato[128];
    if(sscanf(params, "s", relato))
        return SendClientMessage(playerid, COR_ADMIN, "Use /relatorio [texto]");

    new string[128], Nome[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(string, sizeof(string), "Relatorio - [id: %d] %s relatou: %s", playerid, Nome, relato);
    ABroadCast(-1, string, 1);
    SendClientMessage(playerid, -1, "[BZC] Relatorio enviado com sucesso!! Aguarde o atendimento !.");
    return 1;
}
coloca no topo do gm:


#include <sscanf>
#include <zcmd>




Re: Re : [AJUDA] ajuda com /relatorio - kaastiel - 09.03.2012

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


coloca no topo do gm:


#include <sscanf>
#include <zcmd>

C:\Users\SouzaSantos\Desktop\GM 0.3d\pawno\include\servermoneyGM.inc(1407 : warning: 201: redefinition of constant/macro (symbol "OnGameModeInit")
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 029: invalid expression, assumed zero
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 017: undefined symbol "cmd_relatorio"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 029: invalid expression, assumed zero
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error fatal: 107: too many error messages on one line


Re : Re: Re : [AJUDA] ajuda com /relatorio - steeldark - 09.03.2012

Quote:
Originally Posted by kaastiel
Посмотреть сообщение
C:\Users\SouzaSantos\Desktop\GM 0.3d\pawno\include\servermoneyGM.inc(1407 : warning: 201: redefinition of constant/macro (symbol "OnGameModeInit")
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 029: invalid expression, assumed zero
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 017: undefined symbol "cmd_relatorio"
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error: 029: invalid expression, assumed zero
C:\Users\SouzaSantos\Desktop\GM 0.3d\gamemodes\BML.pwn(1407 : error fatal: 107: too many error messages on one line
esses erros ai parece estarem na include servermoneyGM.inc

ou alguma coisa deve estar entrando em conflito com ela.

toda via, tenta com esse:

pawn Код:
CMD:relato(playerid, params[])
{
    new relato[128],str[128], Nome[MAX_PLAYER_NAME];
    if(sscanf(params, "s", relato)) return SendClientMessage(playerid, COR_ADMIN, "Use /relato [texto]");
    GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
    format(str, sizeof(str), "Relatorio - [id: %d] %s relatou: %s", playerid, Nome, relato);
    ABroadCast(-1, str, 1);
    SendClientMessage(playerid, -1, "[BZC] Relatorio enviado com sucesso!! Aguarde o atendimento !.");
    return 1;
}



Re: [AJUDA] ajuda com /relatorio - paulor - 09.03.2012

1° Voce criou ? eu achava q eu tinha te passado! Topico

2° Eu criei em sscanf e zcmd. Basta vc passar para o que vc usa!

3° Poste as linhas do erro!