I have been looking into this as well and am having the same issue.
I am trying to allow people to put new functionality into custom levels for Diora, essentially mods.
I'd be curious to know if this is intentional or not, I can imagine it might be due to a security issue, but the error is generic so hopefully not!
I think this would be more effort than it's worth, but maybe it would be possible to create a sort of "mini-lua" interpreter. You could probably call functions and access variables from this language by doing _G[name_here] or something similar.
This is one of the things I am doing to support this! In my game, triggers and dialogue can run some pretty sophisticated events like waits, calling _G[name] functions, and stuff like that, its a pretty powerful system. if you want to see how that works its here: Diora Level Editing