Ersk 0 Posted June 7, 2009 Basicly, I have made a script that moves an AI unit (OFpilot1) to an Su-34 (OFplane1), mounts and takes off. The script then checks the to see if fuel is under 90% and if so, orders the unit to land at pita airstrip. I have tried lots of things but the main error I am getting is on the lines of "type boolean, expected number, string, int... etc" but all my data types appear to be correct. [color="Gray"]//ai unit moves to and gets in plane[/color] OFpilot1 doMove position OFplane1; OFpilot1 assignAsDriver OFplane1; [OFpilot1] orderGetIn true; _landed = false; while{_landed == false}do { if(fuel OFpilot1 < 8)then { OFpilot1 landAt 2; [color="gray"]//checks to see if unit has landed[/color] _playerStatus = unitReady OFpilot1; if(_playerStatus == true)then { [color="gray"]//exit loop[/color] _landed = true; } } } note. The first 3 lines of code work fine, the unit moves to the plane and takes off. Thanks in advance. Share this post Link to post Share on other sites
Evil_Echo 11 Posted June 8, 2009 Did you use sqs or sqf as the extension for the script file? Using sqs will make ArmA interpret the script in the older notation and cause some really wierd error messages. I'd add some parens to the fuel check line too, just for luck. Share this post Link to post Share on other sites
Ersk 0 Posted June 8, 2009 The extension i am usng is .sqf. I also tried "if( (fuel OFpilot1) < 8)then" if thats what you meant but that didn't help. Share this post Link to post Share on other sites
xeno 234 Posted June 8, 2009 Replace while{_landed == false}do with while{!_landed}do and if(_playerStatus == true)then with if(_playerStatus)then and if(fuel OFpilot1 < 8)then with if(fuel OFpilot1 < 0.8)then or whatever the value should be. Xeno Share this post Link to post Share on other sites