i just had to replace all instances of imath.abs to math.abs, now it seems to be doing something but i cant see anything.
I wouldn't assume you can just drop in imath as a replacement for math, you'll need to verify that the logic still makes sense. Note in CHDK 1.6, you can use
fmath instead, which is closer since it lets you use floating point, but will still need some adaptation since fmath is based on userdata rather than native numbers.
As far as the script "doing nothing", do you mean that you run the script by selecting and then pressing the shutter in alt mode, and the script starts, but produces no output and doesn't end until you press the shutter again? Or something else?
My approach generally would be start putting in print statements to understand what parts of the code are actually executing.
One other thing I didn't see immediately on github page is what Lua version the script is written for. CHDK Lua is 5.1, so code written for other versions may need to be adjusted.