h → temporal variable name assigned in every loop. value = integer.
firstRow → must be an integer; the first value for “h”
loopValue → integer; when “h” is higher than this value, it will break the repeat loop
Eg:
set testH to {}
repeat with h from 1 to 5
set end of testH to h
end repeat
testH --> {1, 2, 3, 4, 5}
So, make sure that both “firstRow” and “loopValue” are numbers, and “loopValue” is higher than “firstRow” (in its basics)