It's not a typo. There are 3 similar functions:
https://www.ffastrans.com/wiki/doku.php ... _functions
It's not a typo. There are 3 similar functions:
$roundd(number to round =number/%f_variable%[, number of output decimals = integer/%i_variable%])
Thanks so much guys. It does work!emcodem wrote: ↑Mon Dec 16, 2024 6:49 pm You are faster than steinar
Anyway, it seemed to work with $round instead of $roundd...
Try in a populate processor, set s_success to:
$roundd(409/2,0)*2
dont work
$round(409/2,0)*2
works
$roundu(409/2,0)*2
dont work
when you change the number to "2.0" or "2" instead of "2,0", all 3 functions work.
A short talk to steinar revealed that in his post before, the comma was intended to be actually a parameter to the roundd function but it does not take parameters(anymore?)... the old post is now corrected to avoid future users errors.
So after all, the real issue with this all is that $round does take a second argument, thus it reacts to 2,0 (treating 0 as second arg), while $roundd does not support an argument thus it just fails.
By pure accident, i was right that we need to update the inbuilt documentation because $roundd is documented with this example but it does acutally not take a 2nd parameter.$roundd(number to round =number/%f_variable%[, number of output decimals = integer/%i_variable%])