script problem
#1

i created i filterscript that drops a money bag when player died but here is the error

PHP код:
D:\gta\Torreto Racing\filterscripts\yosis.pwn(62) : error 001expected token";"but found "-identifier-"
D:\gta\Torreto Racing\filterscripts\yosis.pwn(62) : error 017undefined symbol "money"
D:\gta\Torreto Racing\filterscripts\yosis.pwn(63) : error 035argument type mismatch (argument 2)
D:\gta\Torreto Racing\filterscripts\yosis.pwn(150) : error 017undefined symbol "money"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
Here is the errored lines

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(killeridxyz)
    
money CreatePickup(15502x,y,z);
    
SendClientMessage(playerid"Money bag spawned");
    return 
1;

and
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    
GivePlayerMoney(playerid,1550);
    
DestroyPickup(money);
    return 
1;

sorry for bad english and big size i just love the size here
Reply
#2

pawn Код:
//add this near the top of your script
new money;

public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(killerid, x, y, z);    // <-- was missing the semicolon
    money = CreatePickup(1550, 2, x,y,z);   //i donnot see money defined! not sure..
    SendClientMessage(playerid,-1, "Money bag spawned"); //missing the color param
    return 1;
}
read the comments in this code
Reply
#3

lol thanx but why is the other errors
Reply
#4

i edited my post try it now.
Reply
#5

thanx and what about line 150 can you fix that to
Reply
#6

what other errors?
they should ALL be fixed with this.
replace your function with the one i posted and add new money;
near the top of your script

if you got more errors please post them

edit:
line 150 was caused by the missing new money;
Reply
#7

So put:
pawn Код:
new money;
Somewhere at the top of your Script...
Reply
#8

yeah i know really sorry for abouseing thanx all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)