script problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: script problem (
/showthread.php?tid=335247)
script problem -
davidman2 - 17.04.2012
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 001: expected token: ";", but found "-identifier-"
D:\gta\Torreto Racing\filterscripts\yosis.pwn(62) : error 017: undefined symbol "money"
D:\gta\Torreto Racing\filterscripts\yosis.pwn(63) : error 035: argument type mismatch (argument 2)
D:\gta\Torreto Racing\filterscripts\yosis.pwn(150) : error 017: undefined symbol "money"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Here is the errored lines
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(killerid, x, y, z)
money = CreatePickup(1550, 2, x,y,z);
SendClientMessage(playerid, "Money bag spawned");
return 1;
}
and
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
GivePlayerMoney(playerid,1550);
DestroyPickup(money);
return 1;
}
sorry for bad english and big size i just love the size here
Re: script problem -
Jonny5 - 17.04.2012
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
Re: script problem -
davidman2 - 17.04.2012
lol thanx but why is the other errors
Re: script problem -
Jonny5 - 17.04.2012
i edited my post try it now.
Re: script problem -
davidman2 - 17.04.2012
thanx and what about line 150 can you fix that to
Re: script problem -
Jonny5 - 17.04.2012
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;
Re: script problem -
aRoach - 17.04.2012
So put:
Somewhere at the top of your Script...
Re: script problem -
davidman2 - 17.04.2012
yeah i know really sorry for abouseing thanx all