SA-MP Forums Archive
Fixed. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Fixed. (/showthread.php?tid=151306)



Fixed. - Antonio [G-RP] - 29.05.2010

Fixed.


Re: Invalid Function or Declaration? - Jonni8 - 29.05.2010

Use this : ?

pawn Код:
if ((newkeys && (KEY_LOOK_RIGHT || KEY_FIRE)) == (KEY_LOOK_RIGHT || KEY_FIRE) && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))



Re: Invalid Function or Declaration? - ipsBruno - 30.05.2010

pawn Код:
if ((newkeys & (KEY_LOOK_RIGHT || KEY_FIRE)) == (KEY_LOOK_RIGHT || KEY_FIRE) && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
or

pawn Код:
if ((newkeys & (KEY_LOOK_RIGHT & KEY_FIRE)) == (KEY_LOOK_RIGHT & KEY_FIRE) && (GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
| = Invalid
|| = Correct
or

&


Re: Invalid Function or Declaration? - Antonio [G-RP] - 30.05.2010

Fixed


Re: Invalid Function or Declaration? - Antonio [G-RP] - 30.05.2010

* bumpkins *


Re: Invalid Function or Declaration? - [HiC]TheKiller - 30.05.2010

I'd do it like this

pawn Код:
if (newkeys & KEY_LOOK_RIGHT && newkeys & KEY_FIRE && GetPlayerState(playerid)==PLAYER_STATE_DRIVER)
Not sure if that works =D. You may have to do it on 2 lines.


Re: Invalid Function or Declaration? - Simon - 30.05.2010

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
I have this now..

pawn Код:
if ((newkeys & (KEY_LOOK_RIGHT & KEY_FIRE) && GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
But I still get the error.
It looks like you have one unmatched parenthesis:

pawn Код:
if ((newkeys & (KEY_LOOK_RIGHT | KEY_FIRE)) && (GetPlayerState(playerid) == PLAYER_STATE_DRIVER))



Re: Invalid Function or Declaration? - Antonio [G-RP] - 30.05.2010

Thanks guys, Ill try these tomorrow


Re: Invalid Function or Declaration? - Antonio [G-RP] - 30.05.2010

Fixed


Re: Invalid Function or Declaration? - Nero_3D - 30.05.2010

Quote:
Originally Posted by Antonio (eternalrp.webatu.com)
pawn Код:
if ((newkeys & (KEY_LOOK_RIGHT | KEY_FIRE)) && (GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
Still error..
try if(newkeys) still error => its not this line!
Your code in the first post was correct