[Ajuda] Erro na Copilaзгo!
#1

Estou criando um dialog porem quando copilo estб dando esses erros.

PHP код:
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(965) : error 027invalid character constant
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(965) : error 027invalid character constant
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 001expected token"-string end-"but found "-identifier-"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 001expected token";"but found ")"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : error 029invalid expressionassumed zero
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(971) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

Dialog no onplayerconnect:
PHP код:
if (dUserINT(PlayerName2(playerid)).("banned") == 1)
    {
        new 
GBan[590], S[950], SS[950];
     
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~r~CONTA BANIDA!",10000,3);
        
//SendClientMessageToAll(grey, string); //Mensagem OLD
        
SendClientMessage(playeridred"A conta estб Banida!");
        
format(Ssizeof(S), "{FFFFFF}Vocк foi {FF0000}banido\Admin responsavel: {FFFFFF}%s\n"dUserINT(PlayerName2(playerid)).("adminb"));
        
strcat(SSS);
        
format(Ssizeof(S), "{FF0000}Motivo: {FFFFFF}%s\n"dUserINT(PlayerName2(playerid)).("motivob"));
        
strcat(SSS);
        
format(Ssizeof(S), "{FF0000}Dia: {FFFFFF}%s\n"dUserINT(PlayerName2(playerid)).("datab"));
        
strcat(SSS);
        
format(Ssizeof(S), "{FF0000}Hora: {FFFFFF}%s\n" dUserINT(PlayerName2(playerid)).("horab")));
        
strcat(SSS);
        
format(Ssizeof(S), "{FF0000}Forum: {FFFFFF}www.seusite.com");
        
strcat(SSS);
        
ShowPlayerDialog(playeridDIALOG_EBANDIALOG_STYLE_MSGOX"Banimento"SS"Sair""");
        print(string);
        
SaveToFile("KickLog",string);  Kick(playerid);
    } 
Comando do ban:
PHP код:
dcmd_ban(playerid,params[]) {
    if(
PlayerInfo[playerid][LoggedIn] == 1)
    {
        if(
PlayerInfo[playerid][Level] >= 2)
        {
            new 
tmp[256], tmp2[256], S[900], Indextmp strtok(params,Index), tmp2 strtok(params,Index);
            if(!
strlen(params)) return SendClientMessage(playeridred"| ERRO |: USE: /ban [playerid] (Motivo)");
            if(!
strlen(tmp2)) return SendClientMessage(playeridred"| ERRO |: Coloque o Motivo!");
            new 
player1playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
            
player1 strval(tmp);
            if(
IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid && (PlayerInfo[player1][Level] != ServerInfo[MaxAdminLevel]) )
            {
                if(
PlayerInfo[player1][Level] >= && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"| ERRO |: Vocк nгo pode banir um Admin!");
                if(!
IsNumeric(tmp)) return SendClientMessage(playerid,red,"| ERRO |: ID Invalida");
                
GetPlayerName(player1playernamesizeof(playername)); GetPlayerName(playeridadminnamesizeof(adminname));
                new 
year,month,day,hour,minuite,secondgetdate(yearmonthday); gettime(hour,minuite,second);
                
CMDMessageToAdmins(playerid,"BAN");
                
format(string,sizeof(string),"| BvD-Admin | O(a) Administrador(a) %s Baniu o(a) Jogador(a) %s (Motivo: %s) ",adminname,playername,params[2],day,month,year,hour,minuite);
                
SendClientMessageToAll(red,string);
                
SaveToFile("BanLog",string);
                print(string);
                if(
udb_Exists(PlayerName2(player1)) && PlayerInfo[player1][LoggedIn] == 1)
                {
                    
dUserSetINT(PlayerName2(player1)).("banned",1);
                    
format(Ssizeof(S), "%s"PlayerName2(playerid));
                    
dUserSetINT(PlayerName2(player1)).("adminb"S);
                    
format(Ssizeof(S), "%02s"params[2]);
                    
dUserSetINT(PlayerName2(player1)).("motivob"S);
                    
format(Ssizeof(S), "%02d/%02d/%02d"daymonthyear);
                    
dUserSetINT(PlayerName2(player1)).("datab"S);
                    
format(Ssizeof(S), "%02d:%02d:%02d"hourminuitesecond);
                    
dUserSetINT(PlayerName2(player1)).("horab"S);
                }
                
format(string,sizeof(string),"Banido pelo Administrador %s. (Motivo: %s)"adminnameparams[2] );
                
BanNotify(player1);
                
SetTimerEx("DelayedBan"1000false"d"player1);
                return 
1;
            }
            else return 
SendClientMessage(playeridred"| ERRO |: Jogador(a) nгo Conectado(a)!");
        }
        else return 
SendClientMessage(playerid,red,"| ERRO |: O comando digitado nгo Existe!");
    }
    else return 
SendClientMessage(playerid,red,"| ERRO |: Voce deve estar logado para usar estes comandos");

pff alguem me ajude! tks!
Reply
#2

Mostre em qual linha estб o erro '-'
Reply
#3

Baixe essas includes

DOF2 //Include de salvamento de arquivos, como esse do ban info. By Double-O-Files

sscanf //uso de parameters como /kick [id] [motivo]. (Bem mais prбtico) By ******

zcmd //substitui o command strcmp, o uso dele й bem mais pratico junto com sscanf. By Zeex
Reply
#4

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
Baixe essas includes

DOF2 //Include de salvamento de arquivos, como esse do ban info. By Double-O-Files

sscanf //uso de parameters como /kick [id] [motivo]. (Bem mais prбtico) By ******

zcmd //substitui o command strcmp, o uso dele й bem mais pratico junto com sscanf. By Zeex
deu esse erro aqui:
PHP код:
C:\Users\HomeUser\Desktop\Projeto GM\pawno\include\malloc.h.inc(5) : fatal error 100cannot read from file"features.h"
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
Reply
#5

Quote:
Originally Posted by Pedro1812
Посмотреть сообщение
deu esse erro aqui:
PHP код:
C:\Users\HomeUser\Desktop\Projeto GM\pawno\include\malloc.h.inc(5) : fatal error 100cannot read from file"features.h"
Compilation aborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
EM Qual include?

baixa aqui arquivo compactado.

Download
Reply
#6

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
EM Qual include?

baixa aqui arquivo compactado.

Download
entгo... eu coloquei as includes na pasta "pawno >> includes" dai coloquei na gm,porem voltou o erro que estava.

http://imgur.com/9OcsNxY

Erros:

PHP код:
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(967) : error 027invalid character constant
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(967) : error 027invalid character constant
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(973) : error 001expected token"-string end-"but found "-identifier-"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(973) : error 001expected token";"but found ")"
C:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(973) : error 029invalid expressionassumed zero
C
:\Users\HomeUser\Desktop\Projeto GM\filterscripts\ladmin.pwn(973) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

Reply
#7

Poste sу as linhas (967) e (973)
Reply
#8

por quк tem duas includes samp?



compile novamente, feche o arquivo, abra novamente CTRL+A em seu GM, crie um novo arquivo pawno CTRL+A no novo arquivo e CTRL +V. E compile novamente.


Код:
#include <a_samp>
#include <DOF2>
#include sscanf
#include zcmd
//#include Foreach
#include <lethaldudb2>


#define RONALDO_NOL 432

#define FILTERSCRIPT 



#pragma tabsize 0
#pragma dynamic 145000
Na Callback cmdtext adicione isso ao code

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    return 
false;

abaixo:

PHP код:
CMD:meucomando(playeridparams[])
{
    
SendClientMessage(playerid,-1,"Meu Commando!");
    return 
1;

Reply
#9

if (dUserINT(PlayerName2(playerid)).("banned") == 1)
{
static const str[] = {"{FFFFFF}Voc? foi {FF0000}banido\Admin responsavel: {FFFFFF}%s\n{FF0000}Motivo: {FFFFFF}%s\n{FF0000}Dia: {FFFFFF}%s\n{FF0000}Hora: {FFFFFF}%s\n{FF0000}Forum: {FFFFFF}www.seusite.com"};
new string[sizeof(str)+256];
GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~ r~CONTA BANIDA!",10000,3);
//SendClientMessageToAll(grey, string); //Mensagem OLD
SendClientMessage(playerid, red, "A conta est? Banida!");
format(string, sizeof(string), str, dUserINT(PlayerName2(playerid)).("adminb"),dUserIN T(PlayerName2(playerid)).("motivob")),dUserINT(Pla yerName2(playerid)).("datab")),dUserINT(PlayerName 2(playerid)).("horab")));
ShowPlayerDialog(playerid, DIALOG_EBAN, DIALOG_STYLE_MSGOX, "Banimento", string, "Sair", "");
print(string);
string[0] = EOS;
SaveToFile("KickLog",string); Kick(playerid);
}
Reply
#10

obrigado a tds!!!!!!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)