Error in superjump
#1

Quote:

if (PRESSED(KEY_JUMP))
{
new
Float,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 10.0);
}
return 1;
}

undefined symbol "PRESSED"
then i will defined him
Quote:

#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

again error help plz
Reply
#2

Make sure you put #define PRESSED... under your includes. (#include)
Reply
#3

Make sure you put the define line before the superjump (near includes), and copy it exactly as it is.

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Reply
#4

which include
Reply
#5

Includes.. example:

pawn Код:
#include a_samp
Make sure you put the define line below the includes.
Reply
#6

You can define and undefine things anywhere you like, as long as they're defined before they're used (obviously). Definitions are not limited to any one scope.
Reply
#7

Place that code under OnPlayerKeyStateChange, like Vince said, you need to define the parameters or the code before you use it.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)