SA-MP Forums Archive
GetObjectPos 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: GetObjectPos Error (/showthread.php?tid=182684)



GetObjectPos Error - VonKnox - 12.10.2010

When I try compile my script I get an error saying that "Undefined Symbol: "GetObjectPos"". (or something along those lines).

The two lines of script looks like this:

new Float, Float:y, Float:z;
GetObjectPos(1654, Float, Float:y, Float:z);



1654 = The object ID (Dynamite)
Checks for the X, Y and Z position of the dynamite object.


Not quite sure why I get this error or how I fix it, help is appreciated.

Thanks in advance.


Re: GetObjectPos Error - Retardedwolf - 12.10.2010

pawn Код:
GetObjetPos(1654, x, y, z);
?


Re: GetObjectPos Error - <Weponz> - 12.10.2010

post whole code using [c0de][/code]


Re: GetObjectPos Error - Tee - 12.10.2010

Quote:
Originally Posted by <Weponz>
Посмотреть сообщение
post whole code using [c0de][/code]
Wrong. Use [ pawn ] [ /pawn ] (without spaces, thats the best i could expalin it).


Re: GetObjectPos Error - Rachael - 12.10.2010

I have never used GetObjectPos, but I would think the object id is the id returned when you create the object, not the modelID.


Re: GetObjectPos Error - Babul - 12.10.2010

at top of your script, simply create an array to hold 1 object per player
Код:
new Dynamite[MAX_PLAYERS];
then create the object when its needed (a command i assume)
Код:
Dynamite[playerid]=CreateObject(1654,x,y,z);
once its created, you can peek the positions
Код:
new Float:x, Float:y, Float:z;
GetObjectPos(Dynamite[playerid],x,y,z);