SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 12/07/2018, 01:29 AM   #1
BrGabrielBr
Huge Clucker
 
BrGabrielBr's Avatar
 
Join Date: Jul 2016
Location: Rio De Janeiro
Posts: 468
Reputation: 5
Default Erros no sistema de ban!

To pegando um sistema de ban do gamemode de torcidas é adaptando pro meu gamemode más deu esse erro aq numa linha
PHP Code:
C:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1410) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1410) : warning 236unknown parameter in substitution (incorrect #define pattern)
C:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1410) : warning 236: unknown parameter in substitution (incorrect #define pattern)
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1410) : warning 236unknown parameter in substitution (incorrect #define pattern)
C:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1410) : error 029: invalid expression, assumed zero
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1410) : warning 215expression has no effect
C
:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1410) : error 029: invalid expression, assumed zero
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1410) : warning 215expression has no effect
C
:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1410) : error 001: expected token: ";", but found ")"
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1410) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

deu 4 erros é esse monte de aviso linha do erro
PHP Code:
SCMToAll(COLOR_RED,string); 
sistema completo
PHP Code:
forward BanExtenDJB(id,reason[]);
public 
BanExtenDJB(id,reason[])
{

    
printf("FS Ban");
    new 
string[256];
    
format(string,256,"[SERVER]: %s [%i] foi banido pelo JB Admin | Motivo: %s ",Nome(id),id,reason);
    
SCMToAll(COLOR_RED,string);

    
Server[Bans] ++;

    new 
playerip[24];
    
GetPlayerIp(idplayeripsizeof(playerip));
    new 
banfile[256];

    
banfile GetBannedFile(id);

    new 
hourminuteseconddaymonthyear;
    
gettime(hourminutesecond);
    
getdate(yearmonthday);

    
DOF2_CreateFile(banfile);

    new 
banfile2[256];
    
format(banfile2,256,BANIDOS(Nome(id)));
    
DOF2_CreateFile(banfile2);

    
DOF2_SetString(banfile,"PlayerName"Nome(id));


    
DOF2_SetString(banfile,"AdminName""WR BOT");
    
DOF2_SetString(banfile2,"AdminName""WR BOT");

    
DOF2_SetString(banfile,"Motivo"reason);
    
DOF2_SetString(banfile2,"Motivo"reason);

    
format(stringsizeof(string), "%02d/%02d às %02d:%02d"daymonthhourminute);
    
DOF2_SetString(banfile,"Data"string);
    
DOF2_SetString(banfile2,"Data"string);
    
DOF2_SaveFile();
    return 
Kick(id);

__________________
BrGabrielBr is offline   Reply With Quote
Old 12/07/2018, 12:56 PM   #2
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 3,634
Reputation: 290
Default Re: Erros no sistema de ban!

O que tem em SCMToAll?
Qual função/definição você usou?
__________________
A fé na vitória tem que ser inabalável.


Procurando um programador? Achou! Contato através de MP.
ipsLuan is offline   Reply With Quote
Old 12/07/2018, 03:46 PM   #3
HelderPT
Huge Clucker
 
HelderPT's Avatar
 
Join Date: Jan 2018
Posts: 485
Reputation: 18
Default Re: Erros no sistema de ban!

SCMToAll = SendClientMessageToAll acho eu Luan.
__________________
Canal no ytb: encurtador.com.br/hrNT5

Discord: HelderPT#6372
HelderPT is offline   Reply With Quote
Old 12/07/2018, 04:05 PM   #4
ipsLuan
High-roller
 
ipsLuan's Avatar
 
Join Date: Feb 2013
Location: Ilhéus, BA
Posts: 3,634
Reputation: 290
Default Re: Erros no sistema de ban!

Quote:
Originally Posted by HelderPT View Post
SCMToAll = SendClientMessageToAll acho eu Luan.
warning 236: unknown parameter in substitution (incorrect #define pattern)
__________________
A fé na vitória tem que ser inabalável.


Procurando um programador? Achou! Contato através de MP.
ipsLuan is offline   Reply With Quote
Old 12/07/2018, 05:13 PM   #5
BrGabrielBr
Huge Clucker
 
BrGabrielBr's Avatar
 
Join Date: Jul 2016
Location: Rio De Janeiro
Posts: 468
Reputation: 5
Default Re: Erros no sistema de ban!

Quote:
Originally Posted by ipsLuan View Post
O que tem em SCMToAll?
Qual função/definição você usou?
Acho que o erro não está ai porque uso SCMToAll em outros comandos é funciona normalmente
__________________
BrGabrielBr is offline   Reply With Quote
Old 12/07/2018, 05:54 PM   #6
BrGabrielBr
Huge Clucker
 
BrGabrielBr's Avatar
 
Join Date: Jul 2016
Location: Rio De Janeiro
Posts: 468
Reputation: 5
Default Re: Erros no sistema de ban!

Consegui resolve esse agora tá dando erro nessa linha aqui
PHP Code:
C:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1480) : warning 213: tag mismatch
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1480) : error 023: array assignment must be simple assignment
C
:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1480) : warning 215: expression has no effect 
linha do erro
PHP Code:
Player[Bans] += 1
__________________
BrGabrielBr is offline   Reply With Quote
Old 12/07/2018, 06:02 PM   #7
Marllun
Gangsta
 
Marllun's Avatar
 
Join Date: Oct 2016
Location: Brazil
Posts: 862
Reputation: 32
Default Re: Erros no sistema de ban!

Tenta
PHP Code:
Player[playerid][Bans] += 1
__________________
Code:
Discord: Marllun#6297
Marllun is offline   Reply With Quote
Old 12/07/2018, 06:15 PM   #8
BrGabrielBr
Huge Clucker
 
BrGabrielBr's Avatar
 
Join Date: Jul 2016
Location: Rio De Janeiro
Posts: 468
Reputation: 5
Default Re: Erros no sistema de ban!

Quote:
Originally Posted by Marllun View Post
Tenta
PHP Code:
Player[playerid][Bans] += 1
Marllun tá um erro estranho aqui no meu gamemode tá falando que o simbolo não está definido olha
PHP Code:
C:\Users\Lan\Desktop\GameMode's\New\gamemodes\war_rio.pwn(1775) : error 021: symbol already defined: "HexToInt"
C:\Users\Lan\Desktop\GameMode'
s\New\gamemodes\war_rio.pwn(1825) : error 021symbol already defined"isNumeric"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


2 Errors

más não é public é stock
PHP Code:
stock HexToInt(string[])
{
    if (
string[0] == 0)
    {
        return 
0;
    }
    new 
i;
    new 
cur 1;
    new 
res 0;
    for (
strlen(string); 0i--)
    {
        if (
string[i-1] < 58)
        {
            
res res cur * (string[1] - 48);
        }
        else
        {
            
res res cur * (string[i-1] - 65 10);
            
cur cur 16;
        }
    }
    return 
res;
}

stock isNumeric(const string[])
{
  new 
length=strlen(string);
  if (
length==0) return false;
  for (new 
0lengthi++)
    {
      if (
            (
string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+'// Not a number,'+' or '-'
             
|| (string[i]=='-' && i!=0)                                             // A '-' but not at first.
             
|| (string[i]=='+' && i!=0)                                             // A '+' but not at first.
         
) return false;
    }
  if (
length==&& (string[0]=='-' || string[0]=='+')) return false;
  return 
true;

__________________
BrGabrielBr is offline   Reply With Quote
Old 12/07/2018, 06:22 PM   #9
FerrariL
Gangsta
 
FerrariL's Avatar
 
Join Date: Sep 2016
Location: Goiânia
Posts: 553
Reputation: 22
Default Re: Erros no sistema de ban!

Se você realmente procurasse o que está causando erro você iria resolve-lo.
symbol already defined = símbolo já definido.
__________________
Faço sistemas por encomenda, discord: FerrariL
#5104
FerrariL is offline   Reply With Quote
Old 13/07/2018, 01:07 AM   #10
Marllun
Gangsta
 
Marllun's Avatar
 
Join Date: Oct 2016
Location: Brazil
Posts: 862
Reputation: 32
Default Re: Erros no sistema de ban!

Apaga mesmo assim.
__________________
Code:
Discord: Marllun#6297
Marllun is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Erros ao adicionar sistema. PedroRzX Português/Portuguese 4 17/03/2017 04:26 AM
[Ajuda] Sistema de clan com erros Ryper Português/Portuguese 8 20/06/2016 12:44 AM
[Ajuda] Sistema de roubo com erros smkfodao Português/Portuguese 1 03/04/2016 05:33 PM
[Ajuda] Erros Sistema de Registro sofina Português/Portuguese 23 02/12/2012 04:05 PM
[ERROS] Sistema de adm Diogo123 Português/Portuguese 6 01/07/2012 04:04 PM


All times are GMT. The time now is 08:08 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.