variables checking row
#1

Hi,

How checking if variables?

if i do

if( GetPlayerScore(playerid) < 500 && GetPlayerMoney( playerid ) > 5000 )
{

}

first will by checked getplayerscore, or getplayermoney or it's random?
Reply
#2

left to right, GetPlayerScore first then GetPlayerMoney.

since you are using &&, both functions will be called,
but for example, if it's something like this with OR
Код:
if(this() || that())
if this() returns true, the whole if statement results in true and further checking
of, in this case, that() won't happen
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)