In Flexsim 2016 my code works fine, but when I opened the model in 2017 I get the following error:
This is my code. The purpose is to offset operators around the workstation.
treenode current = param(1); treenode activity = param(2); treenode token = param(3); treenode processFlow = ownerobject(activity); /***popup:LabelArray:*/ /**Object from Label Array*/ #define LastEntry 2147483647 treenode involved = /**\nInvolved: *//***tag:involved*//**/token/**/; int index = /**\nIndex: *//***tag:index*//**/getlabel(token, "OpNum")/**/; Variant result = getlabel(involved, /**\nLabel: *//***tag:labelname*//**/"Operators"/**/); treenode Op = NULL; switch (getvartype(result)) { case VAR_TYPE_TREENODEARRAY: { treenodearray array = result; if (index == LastEntry) Op = array[arraysize(array)]; if (index > 0 && arraysize(array) >= index) { Op = array[index]; } } } setloc(Op, xloc(Op), yloc(Op) + (index - 1), 0);