GetObjectPos error
#1

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

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

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

ah yeah thank you TJ )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)