Hi All. Long time listener, first time caller here.
I really have spent the last two hours searching all over for a solution, but have now concluded that the answer to my problem is so simple, no-one has ever needed assistance with it before...
I'm putting together a recruitment script, and I'm just trying to fire some actions conditional on a string passed through with the script call.
I am calling the script with the following (from within another script, btw):
["A"] execVM "Recruit.sqf";
And the (stripped down to try and solve this particular problem) script is:
_g = _this select 0;
hint format ["G is %1", _g];
sleep 3;
if (_g == "A") then
{
hint "The If Fired...";
sleep 3;
};
hint "Script End";
exit
The problem I have is that the IF condition just won't fire, and I can't figure out why.
(Obviously the hints are there for debugging purposes.)
I have tried passing through a number rather than a string, and that doesn't work either. So I'm pretty sure it has something to do with the == operator.
I KNOW this must be just a simple syntax shortfall on my part, but I would really appreciate some guidance.
If I don't go to bed right now, my wife will divorce me, so I have to call it quits for the night. But I'll really appreciate any help anyone can offer.
Peace