Apocal
Jul 27 2009, 15:40
Ripping off Inspired by one of the FLIR script's features, I've decided to try one of my old personalized attempts another shot, in this case temporarily stripping some vehicle crews of their NVGs in vehicles without image intensifier/thermal imager capability. (Oh yeah, I have very little actual training in coding and instead have relied on poking scripts with a stick and seeing what moved, so I'm sure I have gaping holes in my knowledge somewhere.)
This line, directly taken from the FLIR script, works:
if(!(_caller == gunner _vehicle))exitwith{hint "only gunner can use this function."};
My modified line:
if((! (_caller == gunner _vehicle))OR(! (_caller == commander _vehicle)))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
Error given in ArmA.rpt is:
File C:\Users\Sony AR750EB\Documents\ArmA 2 Other Profiles\Apocal\missions\OPERATION2.Chernarus\scri pt2\FLIR_main.sqf, line 6
Protocol bin\config.bin/RadioProtocolRU/: Missing word AwayGrid
Missing word AwayGrid? In the words of the Virgin Mary, "Come again?"
Other attempts include:
if((! _caller == ((gunner)OR(commander)) _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
if((! _caller == ((gunner _vehicle)OR(commander _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
if((! _caller == ((gunner _vehicle)ELSE(commander _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
Where am I messing this up? Syntax? Or is it a standard limitation of OR/ELSE arguments that I'm trying to force through? Even better if there was some intermediate level tutorial on SQF, I checked out a few on OPEC but they didn't help.
This line, directly taken from the FLIR script, works:
if(!(_caller == gunner _vehicle))exitwith{hint "only gunner can use this function."};
My modified line:
if((! (_caller == gunner _vehicle))OR(! (_caller == commander _vehicle)))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
Error given in ArmA.rpt is:
File C:\Users\Sony AR750EB\Documents\ArmA 2 Other Profiles\Apocal\missions\OPERATION2.Chernarus\scri pt2\FLIR_main.sqf, line 6
Protocol bin\config.bin/RadioProtocolRU/: Missing word AwayGrid
Missing word AwayGrid? In the words of the Virgin Mary, "Come again?"
Other attempts include:
if((! _caller == ((gunner)OR(commander)) _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
if((! _caller == ((gunner _vehicle)OR(commander _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
if((! _caller == ((gunner _vehicle)ELSE(commander _vehicle))exitwith{hint "silly insurgent tank driver, you don't get night vision."};
Where am I messing this up? Syntax? Or is it a standard limitation of OR/ELSE arguments that I'm trying to force through? Even better if there was some intermediate level tutorial on SQF, I checked out a few on OPEC but they didn't help.