SA-MP Forums Archive
Undefined symbol - 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: Undefined symbol (/showthread.php?tid=396283)



Undefined symbol - Windrush - 30.11.2012

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_YES**))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
        }
    }
    return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\trucking\filterscripts\engine system.pwn(29) : error 017: undefined symbol "PRESSED"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.



Re: Undefined symbol - MadafakaPro - 30.11.2012

pawn Код:
#define PRESSED(%0) \
             (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Add this at the top of your script


Re: Undefined symbol - dr.lozer - 30.11.2012

put this on put this on top

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