SA-MP Forums Archive
[Ajuda] EVENTO - 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] EVENTO (/showthread.php?tid=632759)



EVENTO - BrGabrielBr - 18.04.2017

PHP код:
dcmd_irevento(playeridparams[])
{
    
#pragma unused params
    
if(Player[playerid][pLogged] == false)
        return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб logado!");
    if(
Evento[a_Status] == true)
    {
          if(
Evento[a_Contagem] == Evento[a_Limite])
            return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Limite de players esgotado.");
        if(
Player[playerid][pInEvento] == true)
            return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк jб estб no Evento!");
        new 
string[128];
        
format(stringsizeof(string), "[INFO] %s foi para o Evento!"getPName(playerid));
        
MensagemLocal(playeridCOR_ROXOstring20);
        
LoadingObject(playerid);
        
ResetPlayerWeapons(playerid);
        
SetPlayerHealth(playerid100);
        
SetPlayerArmour(playerid100);
        new 
PosEvent random(sizeof(RandomEvento));
         
SetPlayerPos(playeridRandomEvento[PosEvent][0], RandomEvento[PosEvent][1], RandomEvento[PosEvent][2]);
        
SetPlayerInterior(playerid10);
        
Evento[a_Contagem] ++;
        
Player[playerid][pInEvento] = true;
        if(
Evento[a_Contagem] == Evento[a_Limite]) {
        
SendFormattedMessageToAll(COR_EVENTO"[INFO] Todos os %d player(s) estiveram presentes nesse Evento."Evento[a_Limite]);
        
Evento[a_Status] = false;
        
Evento[a_Contagem] = 0;
        }
        }
        else
        
SendClientMessage(playeridCOR_ERRO"[ERRO] O Evento estб fechado!");
    return 
1;

Sistema
PHP код:
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(34517) : error 028invalid subscript (not an array or too many subscripts): "RandomEvento"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(34517) : warning 215expression has no effect
C
:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(34517) : error 001expected token";"but found "]"
C:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(34517) : error 029invalid expressionassumed zero
C
:\Users\Lan\Desktop\PROJETOS SAMP\Novo Projeto VDB 2017\gamemodes\PROJETO.pwn(34517) : fatal error 107too many error messages on one line 
erros tentei trocar ] por ) mas nd


Re: EVENTO - Dimbalada - 18.04.2017

mano tenta botar
Quote:

{}

acho que vai dar certo pois sou iniciante no pwn tambem


Re: EVENTO - IlanZ - 18.04.2017

Tente...
PHP код:
dcmd_irevento(playeridparams[]) 

    
#pragma unused params 
    
if(Player[playerid][pLogged] == false
        return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб logado!"); 
    if(
Evento[a_Status] == true
    { 
          if(
Evento[a_Contagem] == Evento[a_Limite]) 
            return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Limite de players esgotado."); 
        if(
Player[playerid][pInEvento] == true
            return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк jб estб no Evento!"); 
        new 
string[128]; 
        
format(stringsizeof(string), "[INFO] %s foi para o Evento!"getPName(playerid)); 
        
MensagemLocal(playeridCOR_ROXOstring20); 
        
LoadingObject(playerid); 
        
ResetPlayerWeapons(playerid); 
        
SetPlayerHealth(playerid100); 
        
SetPlayerArmour(playerid100); 
        new 
PosEvent random(sizeof(RandomEvento)); 
        
SetPlayerPos(playeridRandomEvento[PosEvent][0], RandomEvento[PosEvent][1], RandomEvento[PosEvent][2]); 
        
SetPlayerInterior(playerid10); 
        
Evento[a_Contagem] ++; 
        
Player[playerid][pInEvento] = true
        if(
Evento[a_Contagem] == Evento[a_Limite]) 
        { 
            
SendFormattedMessageToAll(COR_EVENTO"[INFO] Todos os %d player(s) estiveram presentes nesse Evento."Evento[a_Limite]); 
            
Evento[a_Status] = false
            
Evento[a_Contagem] = 0
        } 
    } 
    else{
        
SendClientMessage(playeridCOR_ERRO"[ERRO] O Evento estб fechado!"); 
    } 
    return 
1

Se persistir, mostre a linha do erro pois assim fica foda procurar


Respuesta: EVENTO - BrGabrielBr - 18.04.2017

Quote:

SetPlayerPos(playerid, RandomEvento[PosEvent][0], RandomEvento[PosEvent][1], RandomEvento[PosEvent][2]);

Linha do erro http://imgur.com/a/tKA2s print dos erros


Re: EVENTO - fehzl - 18.04.2017

PHP код:
dcmd_irevento(playeridparams[]) {
    
#pragma unused params
    
if(Player[playerid][pLogged] == false)
        return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк nгo estб logado!");
    if(
Evento[a_Status] == true) {
        if(
Evento[a_Contagem] == Evento[a_Limite])
            return 
SendFormattedMessageToAll(COR_EVENTO"[INFO] Todos os %d player(s) estiveram presentes nesse Evento."Evento[a_Limite]); 
        if(
Player[playerid][pInEvento] == true
            return 
SendClientMessage(playeridCOR_ERRO"[ERRO] Vocк jб estб no Evento!");
        new 
string[128]; 
        
format(stringsizeof(string), "[INFO] %s foi para o Evento!"getPName(playerid)); 
        
MensagemLocal(playeridCOR_ROXOstring20); 
        
LoadingObject(playerid); 
        
ResetPlayerWeapons(playerid); 
        
SetPlayerHealth(playerid100); 
        
SetPlayerArmour(playerid100); 
        new 
PosEvent random(sizeof(RandomEvento)); 
        
SetPlayerPos(playeridRandomEvento[PosEvent][0], RandomEvento[PosEvent][1], RandomEvento[PosEvent][2]); 
        
SetPlayerInterior(playerid10); 
        
Evento[a_Contagem] ++; 
        
Player[playerid][pInEvento] = true;
    } else {
        
SendClientMessage(playeridCOR_ERRO"[ERRO] O Evento estб fechado!"); 
    }
    return 
1

vк ai se cola, procure reescrever o comando nesses casos... olhe o que o erro diz, perdeu indentaзгo.


Respuesta: EVENTO - BrGabrielBr - 18.04.2017

estou tentando botar de novo botei isso seu mas nгo deu certo


Re: EVENTO - fehzl - 18.04.2017

que erro deu?


Respuesta: EVENTO - BrGabrielBr - 19.04.2017

os mesmo


Re: EVENTO - CZ - 19.04.2017

Manda a linha do erro


Re: EVENTO - GuilhermeNunes - 19.04.2017

Amigo vai na linha 34517 e coloca ;

expected token: ";", but found "]"
Esperava encontrar ";",mais encontrou "]" ou seja em algum lugar vc colocou "]" sendo que era pra colocar ";" simples mano revise a linha 34517Jб dei a resposta.