SA-MP Forums Archive
1 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: 1 error (/showthread.php?tid=353890)



1 error - CrazyChoco - 24.06.2012

hai, i used this code in OnPlayerStateChange or something

pawn Код:
if (PRESSED(KEY_LEFT_ALT) && !IsPlayerInAnyVehicle(playerid))
    {
        for(new i = 0;i< MAX_STAIRS; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid,RANGE_LIMIT,stairs[i][0],stairs[i][1],stairs[i][2]))
            {
                return SetPlayerToClimb(playerid,stairs[i][3],stairs[i][4],stairs[i][5]);
            }
        }
    }
but i get this error
error 017: undefined symbol "KEY_LEFT_ALT"


Re: 1 error - Jonny5 - 24.06.2012

their is no KEY_LEFT_ALT

just KEY_LEFT


Re: 1 error - Kindred - 24.06.2012

KEY_LEFT_ALT does not exist. You need to use one of the predefined type of keys. Since left-alt's default action is walking, I'd suggest using KEY_WALK.


Re: 1 error - CrazyChoco - 25.06.2012

Thanks worked perfect