Can't get this if statements -.- - 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: Can't get this if statements -.- (
/showthread.php?tid=424558)
Can't get this if statements -.- -
Tamer - 22.03.2013
And just because of this I always need to return 0 or whatever in the main call back instead of tieing the if statement to a single line
pawn Код:
if(PRESSED(KEY_WALK) && if(GetPlayerTeam(playerid) == 2)); //9219
{
if(IsPlayerInRangeOfPoint(playerid,5,-71.9882,2544.0422,17.0460))
}
(9219) : error 029: invalid expression, assumed zero
(9219) : warning 215: expression has no effect
(9219) : error 001: expected token: ";", but found ")"
(9219) : error 029: invalid expression, assumed zero
pwn(9219) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: Can't get this if statements -.- -
IstuntmanI - 22.03.2013
Replace
pawn Код:
if(PRESSED(KEY_WALK) && if(GetPlayerTeam(playerid) == 2));
with
pawn Код:
if(PRESSED(KEY_WALK) && GetPlayerTeam(playerid) == 2)
Re: Can't get this if statements -.- -
Tamer - 22.03.2013
Doesn't work. It gives 40-45 errors.
Re: Can't get this if statements -.- -
MP2 - 22.03.2013
That's not even possible. The maximum amount of errors that can be shown is 26.
Re: Can't get this if statements -.- -
nickdodd25 - 22.03.2013
Quote:
Originally Posted by costel_nistor96
Replace
pawn Код:
if(PRESSED(KEY_WALK) && GetPlayerTeam(playerid) == 2)
|
Change that to
pawn Код:
if(PRESSED(KEY_WALK) && (GetPlayerTeam(playerid) == 2))
Re: Can't get this if statements -.- -
[D]ry[D]esert - 22.03.2013
Maybe like this ?
pawn Код:
if(PRESSED(KEY_WALK) && GetPlayerTeam(playerid) == 2)
{
if(IsPlayerInRangeOfPoint(playerid,5,-71.9882,2544.0422,17.0460))
{
//code here
}
}
Re: Can't get this if statements -.- -
[D]ry[D]esert - 22.03.2013
Wrong Post.