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)
+--- Thread: GetObjectPos error (/showthread.php?tid=280107)



GetObjectPos error - ylleron - 30.08.2011

pawn Код:
55. if (GetObjectPos(yEditor_sVars[yObj_curObj], 0.0, 0.0, 0.0)) {
i have this line a it saying

(55) : error 035: argument type mismatch (argument 2)

i don't know why?


Re: GetObjectPos error - TTJJ - 30.08.2011

Hi ylleron,

For some reason you are trying to assign a variable in GetObjectPos...
GetObjectPos is intent ended to retrieve a objects position.

The following would be the correct usage:
pawn Код:
new Float:X, Float:Y, Float:Z;
GetObjectPos(yEditor_sVars[yObj_curObj],X,Y,Z);
if(X = bla && Y = bla && Z = bla)
{
    //do stuff
}
Cheers,

TJ


Re: GetObjectPos error - emokidx - 30.08.2011

https://sampwiki.blast.hk/wiki/GetObjectPos
please read this.


Re: GetObjectPos error - ylleron - 30.08.2011

ah yeah thank you TJ )