Comrades in Arms Discussion Board
simple if statmement, I think i am going crazy - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: simple if statmement, I think i am going crazy (/showthread.php?tid=3262)



simple if statmement, I think i am going crazy - treendy - 01-24-2016

This code doesnt seem to work:

it hints "false", but it doesnt hint any others? ??? seems to fall over at the condition, but cant see anything wrong???

Code:
hint bShipPlaced;

if (bShipPlaced == "false") {
   hint "b";
   //createVehicle ["CUP_B_LHD_WASP_USMC_Empty", [9582.9,10579,28.5], [], 10, "CAN_COLLIDE"];
};

hint "C";
publicVariable "bShipPlaced";
bShipPlaced = "true";
publicVariable "bShipPlaced";


hint "d";



Re: simple if statmement, I think i am going crazy - treendy - 01-24-2016

aghhh... stupid XCode, been working on iPad coding and they dont have "then" lol


if (a = b) then {}


If anyone knows a way to show error messages for this, please let me know


Re: simple if statmement, I think i am going crazy - Alwarren - 01-24-2016

Argh, I don't know how often I forgot "then" in SQF and subsequently wrote "then" while coding in C++... that's the problem with knowing too many languages Smile


Re: simple if statmement, I think i am going crazy - Phantom - 01-25-2016

After my C++ class and I made a mission one time for Arma... I got pissy about not knowing why doesn't my syntax work and realize that this was SQF, not C++ -_- ...