Hello,
I´m trying to set a token label with a custom code.
The idea is to set the value of the bay so that later I can stock an item in that specific one.
I need to stock the item in the first available bay from the floor storage, starting from the right (the bay order is already as follows: (5,4,3,2,1), changed from the properties window)
There is a syntax error, but I can not find it.
I´m new to FlexSim so any suggestions or ideas are welcomed.
/**Custom Code*/
Object current = param(1);
treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
for (int i; i<= rackgetnrofbays; i++){
if (rackgetbaycontent(token.where,i) < 1){
token.bay= i;
if (token.bay != 0){
break;
}
}