Old Max Script for Exporting to ass files no longer working


I’m trying to use a script to export to a certain file type but whenever I try to use it I get this error
Line 302 seems to be causing the issue. The last version of max I saw this script work in was 2015. I’m using 2020.

Any help is greatly appreciated, thank you.

The script can be found here


The code is a bit buggy.
Make sure all your objects have a material (and that every face has a valid mat id) and try exporting them.