The last expression is 1. In for or foreach, it must evaluate to an array.
You have incorrectly defined your Mortar-Range function as follows:
def Mortar-Range leaps #0 1 1 or rays #0 1 0;
The or operator cannot be used to merge two arrays. It returns a Boolean value. That's why it gave a value of 1 where an array was expected. Use the merge operator to merge two arrays:
You have incorrectly defined your Mortar-Range function as follows:
The or operator cannot be used to merge two arrays. It returns a Boolean value. That's why it gave a value of 1 where an array was expected. Use the merge operator to merge two arrays: