error help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: error help (
/showthread.php?tid=106205)
error help -
kennyist - 01.11.2009
im getiing "C:\Users\tristan\Documents\My Received Files\test.pwn(215) : error 010: invalid function or declaration"
on this
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
if (pickupid == foodshop1)
{
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
ShowMenuForPlayer(foodshops, playerid);
TogglePlayerControllable(playerid, 0);
}
(line 215) if (pickupid == foodshop2)
{
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
ShowMenuForPlayer(foodshops, playerid);
TogglePlayerControllable(playerid, 0);
}
//return 0;
//}
even tho ive used the same code before.
Re: error help -
dice7 - 01.11.2009
You forgot a bracket after public OnPlayerPickUpPickup(playerid, pickupid)
Re: error help -
kennyist - 01.11.2009
oh lol

. my bad eye sight ..... :S , nope still get the same
Re: error help -
Peter_Corneile - 01.11.2009
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if (pickupid == foodshop1)
{
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
ShowMenuForPlayer(foodshops, playerid);
TogglePlayerControllable(playerid, 0);
}
else if (pickupid == foodshop2)
{
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0);
ShowMenuForPlayer(foodshops, playerid);
TogglePlayerControllable(playerid, 0);
}
return 0;
}
Re: error help -
kennyist - 01.11.2009
ok i got all that working then i started another menu
Код:
if(CurrentMenu == sexshops)
{
switch(row)
{
case 0:
{
GivePlayerMoney(playerid, -500);
GivePlayerWeapon(playerid,10,1);
}
but since i put that in my server just crashes , is it to do with the GivePlayerWeapon?
other bits put inn at the same time
Код:
new sexshop1;
sexshop1 = CreatePickup(1318, 2, -105.0409,-11.2407,1000.7188);
new Menu: sexshops;