How to add this onto a timer?
#1

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
Reply
#2

the code is right, post the errors
Reply
#3

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.
Reply
#4

Any Help Will Be Much Appreciated,

EDIT: Sorry for double post
Reply
#5

There missing a ); somewhere..
Reply
#6

function heading differs from prototype

this means you need to correct the forward.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)