Nikoladis 12 Posted September 16, 2019 (edited) I have this line in the trigger condition, why does it give a generic error in expression when I run scenario? this and (taskCompleted t1) and (taskCompleted t2) and (taskCompleted t3) and (taskCompleted t4) and (taskCompleted t5) t1 to t5 all exist right from start. They are all tasks. The error comes both when evaluating trigger as server only or not. Also if I try this then I get invalid number in expression: this and ((taskState t1 == "Succeeded") or (taskState t1 == "Canceled")) and ((taskState t2 == "Succeeded") or (taskState t2 == "Canceled")) and ((taskState t3 == "Succeeded") or (taskState t3 == "Canceled")) and ((taskState t4 == "Succeeded") or (taskState t4 == "Canceled")) and ((taskState t5 == "Succeeded") or (taskState t5 == "Canceled")) Edited September 16, 2019 by Nikoladis Share this post Link to post Share on other sites
Play3r 147 Posted September 16, 2019 if you put one in at a time first : this && (taskCompleted t1) and se if that work you can then ad another this && (taskCompleted t1) && (taskCompleted t2)... to see which one there is making the error. 1 Share this post Link to post Share on other sites
Nikoladis 12 Posted September 16, 2019 When I do that I also get the error. Btw. the tasks are made with "create task" modules. Found a workaround though: this and ["t1"] call BIS_fnc_taskCompleted and ["t2"] call BIS_fnc_taskCompleted and ["t3"] call BIS_fnc_taskCompleted and ["t4"] call BIS_fnc_taskCompleted and ["t5"] call BIS_fnc_taskCompleted 2 Share this post Link to post Share on other sites
Play3r 147 Posted September 16, 2019 i just went up to (taskcompleted t7) with no problem on a empty map just to try it out.. Share this post Link to post Share on other sites
Larrow 2822 Posted September 17, 2019 this && { _x call BIS_fnc_taskState == "SUCCEEDED" }count[ "t1", "t2", "t3", "t4", "t5" ] isEqualTo 5 If you want it to fire if all the tasks where completed successfully. this && { _x call BIS_fnc_taskCompleted }count[ "t1", "t2", "t3", "t4", "t5" ] isEqualTo 5 If you want it to fire if the tasks are completed no matter their state, Cancelled, Succeeded or Failed. Where "t1" to "t5" are the task ID given in the createTask module. You should not use task commands with BI's task functions/modules. 2 Share this post Link to post Share on other sites
Nikoladis 12 Posted September 17, 2019 very neat, thank you Share this post Link to post Share on other sites
Schatten 290 Posted September 17, 2019 @Nikoladis, this && { (["t1", "t2", "t3", "t4", "t5"] findIf { !([_x] call BIS_fnc_taskCompleted) }) < 0 } 1 1 Share this post Link to post Share on other sites