5 Aug 2020, 15:59

The negative step loop might be the culprit here. Fuze doesn't do these loops the way you would expect it to.
Replace:
for i = len(trail)-1 to -1 step -1 loop
with
for i = len(trail)-1 to 0 loop
and see if that works. I suspect Fuze may have been crashing on reading trail[-1] because the loop doesn't stop at 0 like the positive step loops do. Also the sign of the step is unneeded because Fuze determines the direction from the start and stop values.