SA-MP Forums Archive
Teleport help, compile error - 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: Teleport help, compile error (/showthread.php?tid=107378)



Teleport help, compile error - Samslime - 09.11.2009

ERROR CODE
Код:
C:\Program Files\Rockstar Games\GTA United\gtau-server.win32\gamemodes\penvc.pwn(6707) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA United\gtau-server.win32\gamemodes\penvc.pwn(6762) : warning 204: symbol is assigned a value that is never used: "LCVCAIR"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
In the top of my script
Код:
new VCLCAIR;
new LCVCAIR;
In OnGameModeInit:

Код:
	VCLCAIR = AddStaticPickup(6946, 2, 775.2029,-2192.7610,9.3248);
	LCVCAIR = AddStaticPickup(6946, 2, -2119.9409,1199.6786,11.2917);
In OnPlayerPickUpPickup:
public OnPlayerPickUpPickup(playerid,pickupid)
Код:
 if(pickupid == VCLCAIR)
	{
	GameTextForPlayer(playerid,"~g~Your Plane has arrived at LC Airport",5000,3);
	SetPlayerPos(playerid,-2117.5942,1199.3430,11.2992);
	SetPlayerInterior(playerid,0);
	}
	if(pickupid == LCVCAIR)
	{
	GameTextForPlayer(playerid,"~g~Your Plane has arrived at VC Airport",5000,3);
	SetPlayerPos(playerid,777.2658,-2190.5876,9.1532);
	SetPlayerInterior(playerid,0);
	}



Re: Teleport help, compile error - DeathOnaStick - 10.11.2009

Could you exacly give me line 6707, please?


Re: Teleport help, compile error - Samslime - 14.11.2009

if(pickupid == LCVCAIR)


Re: Teleport help, compile error - dice7 - 14.11.2009

Use https://sampwiki.blast.hk/wiki/CreatePickup, AddStaticPickup doesn't return the id


Re: Teleport help, compile error - Samslime - 15.11.2009

Have tried with Createpickup indted of addstaticpickup -.-
and still the same

Works now i changed "if" to "else if" on the second teleport and now it works !
Ty for answering