You could try @Transform instead of @For - actualy it might even work without a loop at all. - I think I would try this first (New Stuff in Red) -This is not tested.
FIELD M1Per:=“”;
@For(n := 1;
n <= @Elements(M1Hrs);
n := n + 1;
@IF (n = 1;
FIELD M1Per:=@Round((@TextToNumber(M1Hrs[n])*100)/TotalHours;5);));
;
FIELD M1Per:= M1Per : @Round((@TextToNumber(M1Hrs[n])*100)/TotalHours;5);));