Pickup Error.
#1

So, this is the compiler output:
Код:
C:\Users\Gaming\Desktop\SA-MP Pawno\gamemodes\pickup.pwn(8) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Here's the code I've modified:

pawn Код:
new weapon;

weapon = CreatePickup(1276 ,2 ,1364.8728, -1279.6969, 13.5469, -1);// Line of the error.
//These are on top of my script^

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == weapon)
    {
        GivePlayerWeapon(playerid, 23, 50);
        SendClientMessage(playerid, 0xFFFFFFFF, "You've picked up a weapon!");
        GivePlayerMoney(playerid, -100);
    }
    return 1;
}
Thanks in advance.
Reply
#2

Put it under OnGameModeInit

pawn Код:
new weapon; //Top of your script

public OnGameModeInit()
{
    weapon = CreatePickup(1276 ,2 ,1364.8728, -1279.6969, 13.5469, -1);// Line of the error.
    return 1;
}
Reply
#3

Thanks, it worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)