errors
#3

Quote:
Originally Posted by S4t3K
View Post
In fact, I think you haven't yet gotten the point of programmation (I'm not laughing, I was exactly the same at the very beginning).

The function headers are stating variable names (cf : "GetObjectPos(objectid, &Float, &Float:y, &Float:z);").
But when YOU use them, you're absolutely not forced at all to keep the same names.

For example, doing it :

pawn Code:
new
      pObjects[MAX_PLAYERS]
;

CMD:object(playerid, params[])
{
      pObjects[playerid] = CreateObject(1611, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0);
      return 1;
}

// your function

new
      qwertyuiop = pObjects[playerid],
      Float:pos[3]
;
GetObjectPos(qwertyuiop, pos[0], pos[1], pos[2]);
Will get the pos of the integer number which is assigned to the variable "qwertyuiop" (which, btw, is the same as the one assigned to pObjects[playerid]).

But to "define" objectid, you first have to CREATE it.
How to create a variable ?

pawn Code:
new myVariable; // done ! myVariable is created ! do the same with objectid !
man i dont know pawn i am beginner ... how can i slove my solution ?
i created a variable:
pawn Code:
new bool: gMoveObjects;
Reply


Messages In This Thread
errors - by noamch1997 - 21.08.2014, 17:37
Re : errors - by S4t3K - 21.08.2014, 17:43
Re: Re : errors - by noamch1997 - 21.08.2014, 20:11
Re: errors - by Andre02 - 21.08.2014, 20:33
Re: errors - by noamch1997 - 22.08.2014, 02:40

Forum Jump:


Users browsing this thread: 2 Guest(s)