I get the error message
when trying to coerce a large float into an integer, think, it happens here with valinc as 10 or much above 5:
if valinc is not 0 then
log valtper
set valtper to (valtper * (10 ^ valinc)) as integer
log valtper
set valtper to valtper / (10 ^ valinc)
log valtper
end if
return valtper
it’s purpose is to set the float to the number of decimal places valinc by getting all the float you want above the decimal then making it into an integer and dividing it back, it works well otherwise.