Hi everyone
I've been struggling with an error that shows up in the system console. The system console reads:
time: 31073.814080 exception: FlexScript exception: invalid index at MODEL:/Tools/People/Flows/InstancedFlows/Staff/Close?>variables/decision
The error always occurs within a "Release Staff" activity. The model seems to continue running smoothly despite the error, i.e. the tokens do actually release the staff and proceed correctly, however obviously it still bugs me that the error shows up.
I've checked the highlighted destination in the model tree. The following is the FlexScript code within the Custom code "decision":
/**Custom Code*/ Object current = param(1); treenode activity = param(2); Token token = param(3); treenode processFlow = ownerobject(activity); var pos = getvarnode(current, "resetposition").subnodes; Vec3 returnPos = Vec3(pos[1].value, pos[2].value, pos[3].value); Vec3 diff = returnPos - current.location; if(diff.magnitude < current.size.x) return 1; return 2;
My questions are as follows:
1) Is the functionality within said destination of the model tree generated by FlexSim itself?
2) Is the error caused by the param() function or Vec3()?
Note: I can't attach the model since it contains highly sensitive data. Therefore I accept the fact that my problem may not be solvable.