I would ask Avid to fix the script so you no longer get a LUA error.
For now put your master tool in and call the length offset G43 H# then zero the tool to your work cords.
Once you've done this, jog up and swap tools. Jog the new tool down to the block and compare the work cords DRO to the master tool.
Input the TLO in the tool table View > Tool table
Now that the TLO is in the table, call the new G43 number and see if tool tip work cords zero is the same
I'm unsure of Avids TLO setup procedure they recommend but that should work until you get your script fixed.