[AJUDA]Erro ao Compiler um Filterscript
#1

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.
Reply
#2

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;
}
Reply
#3

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;
}
Reply
#4

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;
   }
Reply
#5

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;
}
Reply
#6

@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;
}
Reply
#7

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

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

Poste o FilterScript todo, por completo.
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)