In SQF scripts, if you have boolean variable and you need to check if it's true or false
if(Variable == true) then {}
is not working, and will not even manage else block.
In SQF scripts, if you have boolean variable and you need to check if it's true or false
if(Variable == true) then {}
is not working, and will not even manage else block.
Example code (similar to one which i used):
Spawned = false;
if(Spawned == true) then
{
//Something //Will not run
}
else
{
//Something else //Will not run either
};
Spawned = false;
if(Spawned) then
{
//Something //Will not run
}
else
{
//Something else //Will run
};
Yeah, thanks, I realized that after some time.. But still, is it intentional to == not work like this?
But still, is it intentional to == not work like this
It is, Deadfast's example is the only way how to ask for boolean state.