How to add this onto a timer? - 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: How to add this onto a timer? (
/showthread.php?tid=79475)
How to add this onto a timer? -
JoeDaDude - 28.05.2009
How would i add this code onto a timer
pawn Код:
if(PlayerToPoint(5.0,playerid,1245.5468,-767.7892,91.9618))
{
MoveObject(gate, 1245.535767, -767.239685, 86.785072, 2);
{
I tried this but i got 4 errors
pawn Код:
public BenGate(playerid)
{
if(PlayerToPoint(5.0,playerid,1245.5468,-767.7892,91.9618))
{
MoveObject(gate, 1245.535767, -767.239685, 86.785072, 2);
}
}
If you would like to see the errors i'd be happy to give,
But how would i put that code onto public BenGate(playerid)?
As it checks every 1 milisecond to see if anyone is in that position,
If they are it opens the gate
Re: How to add this onto a timer? -
Nero_3D - 28.05.2009
the code is right, post the errors
Re: How to add this onto a timer? -
JoeDaDude - 28.05.2009
These are the errors:
Код:
C:\Documents and Settings\Joe\Desktop\Server\filterscripts\gates.pwn(11) : error 001: expected token: "(", but found "public"
C:\Documents and Settings\Joe\Desktop\Server\filterscripts\gates.pwn(11) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Joe\Desktop\Server\filterscripts\gates.pwn(70) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: How to add this onto a timer? -
JoeDaDude - 28.05.2009
Any Help Will Be Much Appreciated,
EDIT: Sorry for double post
Re: How to add this onto a timer? -
Cabby - 28.05.2009
There missing a ); somewhere..
Re: How to add this onto a timer? -
miokie - 28.05.2009
function heading differs from prototype
this means you need to correct the forward.