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



Ajuda erros - GustavoG3D - 08.03.2014

PHP Code:
C:\Users\samsunggu\Desktop\AMX DeCoMpIlEr By Host House\descompilar\Incкndio.pwn(32) : error 025: function heading differs from prototype
C
:\Users\samsunggu\Desktop\AMX DeCoMpIlEr By Host House\descompilar\Incкndio.pwn(34) : error 035argument type mismatch (argument 2)
C:\Users\samsunggu\Desktop\AMX DeCoMpIlEr By Host House\descompilar\Incкndio.pwn(74) : error 035argument type mismatch (argument 2)
C:\Users\samsunggu\Desktop\AMX DeCoMpIlEr By Host House\descompilar\Incкndio.pwn(85) : error 035argument type mismatch (argument 2)
C:\Users\samsunggu\Desktop\AMX DeCoMpIlEr By Host House\descompilar\Incкndio.pwn(100) : error 035argument type mismatch (argument 2
deu esses erros
alguem me ajuda pf?

Comando Sistema de Incendio , tou editando ainda!! ta lixo!

Sistema

PHP Code:
#include <a_samp>
#include <core>
#include <float>
new glob0[9];
new 
Float:glob24[9];
new 
Float:glob48[9];
new 
Float:glob6C[9];
new 
glob90;
new 
glob94[9];
new 
globB8[500];
new 
glob888[500];
new 
glob1058[500];
public 
OnFilterScriptInit()
{
    print(
"\n//===================================//");
    print(
" Incкndio by [FeK]Ken - FeK Squad Member");
    print(
"//===================================//\n");
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext)
{
    if(!
strcmp("/incendiar"cmdtexttrue10))
    {
        if(
glob90 == 1)
        {
            return 
SendClientMessage(playerid0xFFFF00AA"[AVISO] Alguйm jб tocou fogo em algum lugar !");
        }
        new 
Float:var0 0Float:var1 0Float:var2 0;
        
GetPlayerPos(playeridvar0var1var2);
        
glob24[0] = -1.9826 var0;
        
glob48[0] = -1.5053 var1;
        
glob6C[0] = var2 2;
        
glob24[1] = -1.9817 var0;
        
glob48[1] = -0.1018 var1;
        
glob6C[1] = var2 2;
        
glob24[2] = -3.2436 var0;
        
glob48[2] = -1.5876 var1;
        
glob6C[2] = var2 2;
        
glob24[3] = -1.9826 var0;
        
glob48[3] = -1.5053 var1;
        
glob6C[3] = var2 2;
        
glob24[4] = -1.7869 var0;
        
glob48[4] = -2.4807 var1;
        
glob6C[4] = var2 2;
        
glob24[5] = -1.1714 var0;
        
glob48[5] = -0.6008 var1;
        
glob6C[5] = var2 2;
        
glob24[6] = -2.4603 var0;
        
glob48[6] = 0.0454 var1;
        
glob6C[6] = var2 2;
        
glob24[7] = -2.7717 var0;
        
glob48[7] = -0.6095 var1;
        
glob6C[7] = var2 2;
        
glob24[8] = -2.4603 var0;
        
glob48[8] = 0.0454 var1;
        
glob6C[8] = var2 2;
        
glob90 1;
        
SendClientMessage(playerid0xFFFF00AA"[AVISO] O Local б sua frente pegarб Fogo em 5 segundos !");
        
SetTimerEx("Incendio"5000false"i"playerid);
        return 
1;
    }
    if(!
strcmp("/molotov"cmdtexttrue8))
    {
        if(
glob90 == 1)
        {
            return 
SendClientMessage(playerid0xFFFF00AA"[AVISO] Alguйm jб tocou fogo em algum lugar !");
        }
        
SendClientMessage(playerid0xFFFF00AA"[AVISO] Vocк recebeu um Molotov para Comeзar um Incкndio !");
        
SendClientMessage(playerid0x33FF00FF"[INFO] Posicione-se e Segure ao Mбximo a Tecla de Atirar para Lanзar o Molotov !");
        
GivePlayerWeapon(playerid181);
        return 
1;
    }
    if(!
strcmp("/caminhao"cmdtexttrue9))
    {
        if(
!= glob90)
        {
            return 
SendClientMessage(playerid0xFFFF00AA"[AVISO] Nгo Estб Acontecendo nenhum Incкndio !");
        }
        new 
Float:var0 0Float:var1 0Float:var2 0Float:var3 0;
        
GetPlayerPos(playeridvar0var1var2);
        
GetPlayerFacingAngle(playeridvar3);
        new 
var4 CreateVehicle(407var0var1var2var33160000);
        
PutPlayerInVehicle(playeridvar40);
        
SetPlayerCheckpoint(playeridglob24[1] - 8.3718glob48[1] - 8.4289glob6C[1], 8.0);
        
SendClientMessage(playerid0xFFFF00AA"[AVISO] Pare no CheckPoint e Apague o Fogo !");
        return 
1;
    }
    if(!
strcmp("/extintor"cmdtexttrue9))
    {
        if(
!= glob90)
        {
            return 
SendClientMessage(playerid0xFFFF00AA"[AVISO] Nгo Estб Acontecendo nenhum Incкndio !");
        }
        
GivePlayerWeapon(playerid42999);
        
SendClientMessage(playerid0xFFFF00AA"[INFO] Apague o Fogo !");
        return 
1;
    }
    return 
0;
}
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
glob90 == 1)
    {
        if((
newkeys == && GetPlayerWeapon(playerid) == 42) || (newkeys == && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407))
        {
            if(
newkeys == && GetPlayerWeapon(playerid) == 42)
            {
                
glob1058[playerid] = 5;
                
globB8[playerid] = 1;
                if(!
glob888[playerid])
                {
                    
SetTimerEx("ApagarFogo"12000false"i"playerid);
                    
glob888[playerid]++;
                }
            }
            else if(
newkeys == && GetVehicleModel(GetPlayerVehicleID(playerid)) == 407)
            {
                if(
IsPlayerInRangeOfPoint(playerid1092616192glob24[1] - 8.3718glob48[1] - 8.4289glob6C[1]))
                {
                    
globB8[playerid] = 1;
                    
glob1058[playerid] = 10;
                    if(!
glob888[playerid])
                    {
                        
SetTimerEx("ApagarFogo"12000false"i"playerid);
                        
glob888[playerid]++;
                    }
                }
            }
        }
        else
        {
            
glob1058[playerid] = 0;
            
globB8[playerid] = 0;
        }
    }
    if(
newkeys == && GetPlayerWeapon(playerid) == 18)
    {
        if(
glob90 == 1)
        {
            return 
SendClientMessage(playerid0xFFFF00AA"[AVISO] Alguйm jб tocou fogo em algum lugar !");
        }
        new 
Float:var0 0Float:var1 0Float:var2 0;
        
GetPlayerPos(playeridvar0var1var2);
        
glob24[0] = (-19.8352 + -1.9826 var0 3) - 0.7077;
        
glob48[0] = 4.9899 + ((-9.3883 + -1.5053 var1) - 7);
        
glob6C[0] = 0.0076 + (var2 2);
        
glob24[1] = (-19.8352 + -1.9817 var0 3) - 0.7077;
        
glob48[1] = 4.9899 + ((-9.3883 + -0.1018 var1) - 7);
        
glob6C[1] = 0.0076 + (var2 2);
        
glob24[2] = (-19.8352 + -3.2436 var0 3) - 0.7077;
        
glob48[2] = 4.9899 + ((-9.3883 + -1.5876 var1) - 7);
        
glob6C[2] = 0.0076 + (var2 2);
        
glob24[3] = (-19.8352 + -1.9826 var0 3) - 0.7077;
        
glob48[3] = 4.9899 + ((-9.3883 + -1.5053 var1) - 7);
        
glob6C[3] = 0.0076 + (var2 2);
        
glob24[4] = (-19.8352 + -1.7869 var0 3) - 0.7077;
        
glob48[4] = 4.9899 + ((-9.3883 + -2.4807 var1) - 7);
        
glob6C[4] = 0.0076 + (var2 2);
        
glob24[5] = (-19.8352 + -1.1714 var0 3) - 0.7077;
        
glob48[5] = 4.9899 + ((-9.3883 + -0.6008 var1) - 7);
        
glob6C[5] = 0.0076 + (var2 2);
        
glob24[6] = (-19.8352 + -2.4603 var0 3) - 0.7077;
        
glob48[6] = 4.9899 + ((-9.3883 0.0454 var1) - 7);
        
glob6C[6] = 0.0076 + (var2 2);
        
glob24[7] = (-19.8352 + -2.7717 var0 3) - 0.7077;
        
glob48[7] = 4.9899 + ((-9.3883 + -0.6095 var1) - 7);
        
glob6C[7] = 0.0076 + (var2 2);
        
glob24[8] = (-19.8352 + -2.4603 var0 3) - 0.7077;
        
glob48[8] = 4.9899 + ((-9.3883 0.0454 var1) - 7);
        
glob6C[8] = 0.0076 + (var2 2);
        
SetTimerEx("MolotovEfeito"1700false"i"playerid);
    }
    return 
1;
}
public 
Incendio(playerid)
{
    new 
var0[200], var1[24];
    
GetPlayerName(playeridvar124);
    
format(var0200"[AVISO] Um Novo Incкndio surgiu na cidade. Culpado: %s !"var1);
    
SendClientMessageToAll(0x33FF00FFvar0);
    
glob0[0] = CreateObject(18690glob24[0], glob48[0], glob6C[0], 0.00.00.00);
    
glob0[1] = CreateObject(18690glob24[1], glob48[1], glob6C[1], 0.00.00.00);
    
glob0[2] = CreateObject(18690glob24[2], glob48[2], glob6C[2], 0.00.00.00);
    
glob0[3] = CreateObject(18691glob24[3], glob48[3], glob6C[3], 0.00.00.00);
    
glob0[4] = CreateObject(18690glob24[4], glob48[4], glob6C[4], 0.00.00.00);
    
glob0[5] = CreateObject(18691glob24[5], glob48[5], glob6C[5], 0.00.00.00);
    
glob0[6] = CreateObject(18690glob24[6], glob48[6], glob6C[6], 0.00.00.00);
    
glob0[7] = CreateObject(18690glob24[7], glob48[7], glob6C[7], 0.00.00.00);
    
glob0[8] = CreateObject(18691glob24[8], glob48[8], glob6C[8], 0.00.00.00);
    
KillTimer(SetTimerEx("Incendio"5000false"i"playerid));
    return 
1;
}
public 
MolotovEfeito(playerid)
{
    new 
var0[200], var1[24];
    
GetPlayerName(playeridvar124);
    
format(var0200"[AVISO] Um Novo Incкndio surgiu na cidade. Culpado: %s !"var1);
    
SendClientMessageToAll(0x33FF00FFvar0);
    
glob0[0] = CreateObject(18690glob24[0], glob48[0], glob6C[0], 0.00.00.00);
    
glob0[1] = CreateObject(18690glob24[1], glob48[1], glob6C[1], 0.00.00.00);
    
glob0[2] = CreateObject(18690glob24[2], glob48[2], glob6C[2], 0.00.00.00);
    
glob0[3] = CreateObject(18691glob24[3], glob48[3], glob6C[3], 0.00.00.00);
    
glob0[4] = CreateObject(18690glob24[4], glob48[4], glob6C[4], 0.00.00.00);
    
glob0[5] = CreateObject(18691glob24[5], glob48[5], glob6C[5], 0.00.00.00);
    
glob0[6] = CreateObject(18690glob24[6], glob48[6], glob6C[6], 0.00.00.00);
    
glob0[7] = CreateObject(18690glob24[7], glob48[7], glob6C[7], 0.00.00.00);
    
glob0[8] = CreateObject(18691glob24[8], glob48[8], glob6C[8], 0.00.00.00);
    
glob90 1;
    
KillTimer(SetTimerEx("MolotovEfeito"2500false"i"playerid));
    return 
1;
}
public 
ApagarFogo(playerid)
{
    new 
var0[150], var1[24];
    if(
glob888[playerid] > && globB8[playerid] == && glob1058[playerid] > 0)
    {
        if(
glob1058[playerid] == 5)
        {
            new 
var2 0;
            while(
var2 9)
            {
                if(
IsPlayerInRangeOfPoint(playerid1092616192glob24[var2], glob48[var2], glob6C[var2]))
                {
                    
DestroyObject(glob0[var2]);
                    
glob94[var2] = 1;
                }
            }
            if(
glob94[8] == 1)
            {
                
glob90 0;
                
globB8[playerid] = 0;
                
glob888[playerid] = 0;
                
GetPlayerName(playeridvar124);
                
format(var0150"[AVISO] Uma Salva de Palmas para Quem Apagou o Fogo, %s !"var1);
                
SendClientMessageToAll(0x33FF00FFvar0);
                
GivePlayerMoney(playerid25000);
                
glob1058[playerid] = 0;
                
SendClientMessage(playerid0x33CCFFAA"[INFO] Vocк Recebeu uma Quantia de 25000 Mil como Prкmio !");
                
KillTimer(SetTimerEx("ApagarFogo"12000false"i"playerid));
            }
        }
        if(
glob1058[playerid] == 10 && IsPlayerInRangeOfPoint(playerid1092616192glob24[1] - 8.3718glob48[1] - 8.4289glob6C[1]))
        {
            new 
var2 0;
            while(
var2 9)
            {
                
DisablePlayerCheckpoint(playerid);
                
DestroyObject(glob0[var2]);
                
glob94[var2] = 1;
            }
            if(
glob94[8] == 1)
            {
                
glob90 0;
                
globB8[playerid] = 0;
                
glob888[playerid] = 0;
                
GetPlayerName(playeridvar124);
                
format(var0150"[AVISO] Uma Salva de Palmas para Quem Apagou o Fogo, %s !"var1);
                
SendClientMessageToAll(0x33FF00FFvar0);
                
GivePlayerMoney(playerid25000);
                
glob1058[playerid] = 0;
                
SendClientMessage(playerid0x33CCFFAA"[INFO] Vocк Recebeu uma Quantia de 25000 Mil como Prкmio !");
                
KillTimer(SetTimerEx("ApagarFogo"12000false"i"playerid));
            }
        }
    }
    return 
1;
}
public 
OnFilterScriptExit()
{
    for(new 
var0 0var0 9var0++)
    {
        
DestroyObject(glob0[var0]);
        
glob94[var0] = 1;
    }
    return 
1;




Re: Ajuda erros - rjjj - 08.03.2014

Erros de compilaзгo sгo comuns quando o cуdigo й resultado de uma decodificaзгo de arquivo .amx .



Use o arquivo .pwn original, que pode ser encontrado em:



https://sampforum.blast.hk/showthread.php?tid=212831



Espero ter ajudado .


Re: Ajuda erros - GustavoG3D - 08.03.2014

Obrigado й que eu so tinha o AMX , converti pra PWN acho que й o programa que poe pra da erros VLW Parceiro!