SA-MP Forums Archive
[AJUDA]Erro ao Compiler um Filterscript - 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]Erro ao Compiler um Filterscript (/showthread.php?tid=337351)



[AJUDA]Erro ao Compiler um Filterscript - ghbraz - 25.04.2012

Galera й o seguinte , eu estou seguindo este tutorial para fazer um Pickup de Equipamento : https://sampforum.blast.hk/showthread.php?tid=116529

Olhem na Pag.4 ... Й o seguinte , eu tou tentando compilar mais n da. Olhe que fiz certinho igual o tutorial dizia (fiz no modo filterscript)

Codigo Abaixo:
Code:
#include <a_samp>

new NovoPickup;

NovoPickup = CreatePickup(1242, 1, 113,1487.3585,-688.2050,94);

public OnPlayerPickUpPickup(playerid, pickupid) {
    if(pickupid == NovoPickup) {
    GameTextForPlayer(playerid,"~w~Armas!", 6000,4);
    GivePlayerWeapon(playerid,24,800);
    GivePlayerWeapon(playerid,25,456);
    GivePlayerWeapon(playerid,29,745);
    GivePlayerWeapon(playerid,31,899);
    GivePlayerWeapon(playerid,34,40);
    GivePlayerWeapon(playerid,42,859);
    GivePlayerWeapon(playerid,44,1);
	}
    return 1;
}
Quando vou compilar olha o error que dб:

Code:
C:\Users\Win7\Desktop\Ghbraz\GTA Creating my servidor\Brasil Play Players 03d\filterscripts\Org-VipCN.pwn(7) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Quem puder ajudar ajude pfv.


Re: [AJUDA]Erro ao Compiler um Filterscript - @Riichard - 25.04.2012

Tente ae!
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid) {
    if(pickupid == NovoPickup) {
    GameTextForPlayer(playerid,"~w~Armas!", 6000,4);
    GivePlayerWeapon(playerid,24,800);
    GivePlayerWeapon(playerid,25,456);
    GivePlayerWeapon(playerid,29,745);
    GivePlayerWeapon(playerid,31,899);
    GivePlayerWeapon(playerid,34,40);
    GivePlayerWeapon(playerid,42,859);
    GivePlayerWeapon(playerid,44,1);
    return 1;
}
return 1;
}



Re: [AJUDA]Erro ao Compiler um Filterscript - Joker_OutLock - 25.04.2012

OnGameModeInit:
pawn Code:
NovoPickup = CreatePickup(1242, 1, 113,1487.3585,-688.2050,94);
pronto...
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid) {
    if (pickupid == NovoPickup) {
        GameTextForPlayer(playerid, "~w~Armas!", 6000, 4);
        GivePlayerWeapon(playerid, 24, 800);
        GivePlayerWeapon(playerid, 25, 456);
        GivePlayerWeapon(playerid, 29, 745);
        GivePlayerWeapon(playerid, 31, 899);
        GivePlayerWeapon(playerid, 34, 40);
        GivePlayerWeapon(playerid, 42, 859);
        GivePlayerWeapon(playerid, 44, 1);
        return 1;
    }
    return 1;
}



Re: [AJUDA]Erro ao Compiler um Filterscript - Diogo123 - 25.04.2012

Code:
topo do gm : new NovoPickup;
OnGameModeInit : NovoPickup = CreatePickup(1242, 1, 113,1487.3585,-688.2050,94);
public OnPlayerPickUpPickup(playerid, pickupid) {
    if(pickupid == NovoPickup) {
    GameTextForPlayer(playerid,"~w~Armas!", 6000,4);
    GivePlayerWeapon(playerid,24,800);
    GivePlayerWeapon(playerid,25,456);
    GivePlayerWeapon(playerid,29,745);
    GivePlayerWeapon(playerid,31,899);
    GivePlayerWeapon(playerid,34,40);
    GivePlayerWeapon(playerid,42,859);
    GivePlayerWeapon(playerid,44,1);
    }
    return 1;
   }



Re: [AJUDA]Erro ao Compiler um Filterscript - RoacH` - 25.04.2012

pawn Code:
//topo do gm
new NovoPickup;

//ongamemodeinit
NovoPickup = CreatePickup ( 1242 , 1 , 113 ,1487.3585 , -688.2050 , 94 ) ;

public OnPlayerPickUpPickup ( playerid , pickupid )
{
    if ( pickupid == NovoPickup )
    {
        GivePlayerWeapon ( playerid , 24 , 800 ) ;
        GivePlayerWeapon ( playerid , 25 , 456 ) ;
        GivePlayerWeapon ( playerid , 29 , 745 ) ;
        GivePlayerWeapon ( playerid , 31 , 899 ) ;
        GivePlayerWeapon ( playerid , 34 , 40 ) ;
        GivePlayerWeapon ( playerid , 42 , 859 ) ;
        GivePlayerWeapon ( playerid , 44 , 1 ) ;
        GameTextForPlayer ( playerid , "~w~Armas!", 6000,4 ) ;
    }
    return 1;
}



Re: [AJUDA]Erro ao Compiler um Filterscript - Don_Speed - 25.04.2012

@RoacHґ
Nao Me Leve a Mal Mas Em OnPlayerPickUpPickup No final ele returna 0 .
Ficaria assim:
pawn Code:
public OnPlayerPickUpPickup ( playerid , pickupid )
{
    if ( pickupid == NovoPickup )
    {
        GivePlayerWeapon ( playerid , 24 , 800 ) ;
        GivePlayerWeapon ( playerid , 25 , 456 ) ;
        GivePlayerWeapon ( playerid , 29 , 745 ) ;
        GivePlayerWeapon ( playerid , 31 , 899 ) ;
        GivePlayerWeapon ( playerid , 34 , 40 ) ;
        GivePlayerWeapon ( playerid , 42 , 859 ) ;
        GivePlayerWeapon ( playerid , 44 , 1 ) ;
        GameTextForPlayer ( playerid , "~w~Armas!", 6000,4 ) ;
    }
    return 0;
}



Re: [AJUDA]Erro ao Compiler um Filterscript - RoacH` - 25.04.2012

Estб funзгo, callback or public nгo retorna um valor especнfico. tanto com return 0; como return 1;
Aqui



Re: [AJUDA]Erro ao Compiler um Filterscript - ghbraz - 27.04.2012

Hm.. Galera se puderem especificar mais , porque continua nгo dando pra compilar... Com o mesmo erro!


Re: [AJUDA]Erro ao Compiler um Filterscript - WeenSoares_ - 27.04.2012

Poste o FilterScript todo, por completo.


Re: [AJUDA]Erro ao Compiler um Filterscript - humildadeforever - 27.04.2012

Topo do GM:
pawn Code:
new NovoPickup;
OnGameModeInit ou OnFilterScriptInit:
pawn Code:
NovoPickup = CreatePickup(1242, 1, 113,1487.3585,-688.2050,94);//tem ctz q й 94? Aн й o VW hein?
public:
pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == NovoPickup)
    {
            GameTextForPlayer(playerid,"~w~Armas!", 6000,4);
            GivePlayerWeapon(playerid,24,800);
            GivePlayerWeapon(playerid,25,456);
            GivePlayerWeapon(playerid,29,745);
            GivePlayerWeapon(playerid,31,899);
            GivePlayerWeapon(playerid,34,40);
            GivePlayerWeapon(playerid,42,859);
            GivePlayerWeapon(playerid,44,1);
    }
    return 1;
}
Compilou certinho aqui!
Code:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase