SA-MP Forums Archive
timer 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: timer problem (/showthread.php?tid=184580)



timer problem - dark_clown - 20.10.2010

humm, im getting this problem
with this timer
Код:
public parkourlifttimer()
{
    if(GetObjectPos(parkourlift,-1835.0871582031, 551.08648681641, 233.88743591309) == 1)//error line
    {
        SendClientMessage(playerid, 0x12FE24FF, "In 5 sec's parkour lifter will go down");
        SetTimer("movingparkourlift",5000,false);
     }
    return 1;
}
Quote:

C:\Users\mike\Desktop\server\filterscripts\gates.p wn(134) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.

error line:
Quote:

if(GetObjectPos(parkourlift,-1835.0871582031, 551.08648681641, 233.88743591309) == 1)//error line




Re: timer problem - DeathOnaStick - 20.10.2010

Read this link, it should help you.


Re: timer problem - dark_clown - 20.10.2010

i did whats your point?


Re: timer problem - DeathOnaStick - 20.10.2010

Quote:
Originally Posted by dark_clown
Посмотреть сообщение
i did whats your point?
It has to be used like this:

pawn Код:
new Float:x, Float:y, Float:z;
GetObjectPos(parkourlift,x, y, z)
if(x==-1.000&&y==1.00&&z==3.5)return 1;



Re: timer problem - Voldemort - 20.10.2010

Have fun
pawn Код:
public parkourlifttimer()
{
    new Float:x,Float:y,Foat:z;
    GetObjectPos(parkourlift,x,y,z);
    if(x == -1835.087 && y == 551.086 && z == 233.887)
    {
        SendClientMessage(playerid, 0x12FE24FF, "In 5 sec's parkour lifter will go down");
        SetTimer("movingparkourlift",5000,0);
    }
    return 1;
}



Re: timer problem - dark_clown - 20.10.2010

Quote:

C:\Users\mike\Desktop\server\filterscripts\gates.p wn(135) : warning 213: tag mismatch
C:\Users\mike\Desktop\server\filterscripts\gates.p wn(136) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.

the 2 errors lines are
Quote:

GetObjectPos(parkourlift,x,y,z);
if(x == -1835.087 && y == 551.086 && z == 233.887)