Can't get this if statements -.-
#1

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
Reply
#2

Replace
pawn Код:
if(PRESSED(KEY_WALK) && if(GetPlayerTeam(playerid) == 2));
with
pawn Код:
if(PRESSED(KEY_WALK) && GetPlayerTeam(playerid) == 2)
Reply
#3

Doesn't work. It gives 40-45 errors.
Reply
#4

That's not even possible. The maximum amount of errors that can be shown is 26.
Reply
#5

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))
Reply
#6

Maybe like this ?
pawn Код:
if(PRESSED(KEY_WALK) && GetPlayerTeam(playerid) == 2)
    {
     if(IsPlayerInRangeOfPoint(playerid,5,-71.9882,2544.0422,17.0460))
        {
            //code here
        }

    }
Reply
#7

Wrong Post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)