21.10.2009, 18:35
You can only check for false or true if you set a bool: tag to a variable (which means you can only use 0 or 1 (but only as false or true) - binary compositions).
Like:
But if you use it like this (your case):
You'll get the same warning (warning 213: tag mismatch) because your variable is just a normal variable.
Or like this:
Like:
pawn Код:
new
bool:myVariable;
stock myFunction(playerid)
{
if(myVariable == true) return 1;
else return 0;
}
pawn Код:
new
myVariable;
stock myFunction(playerid)
{
if(myVariable == true) return 1;
else return 0;
}
Or like this:
pawn Код:
new
bool:myVariable;
stock myFunction(playerid)
{
if(myVariable == 1) return 1;
else return 0;
}