Got it! And found the issue:
You have a function in level_maker.script
which parses the string representation of a hash, for example [/collection0/foobar]
to get the value within brackets: /collection0/foobar
.
This will not work in release builds as we do not store the hash to string lookups in a release build. The hash will be just a number when converted to a string and your code breaks down as it fails to get a meaningful value back. You need to work around this and not rely on the reverse hash lookup.
PS I also noticed that a lot of your functions are global. It does not seem to be causing any problems at the moment but it can open up for nasty and hard to figure out bugs if two scripts or Lua modules define the same global function.