Snap to grid when export to otf

I also tried running the script from this thread but it gave me an error. Do you have a new version of the script?