I’m guessing I have to run go.delete() on a game object script rather than a module. It would be nice to at least get a more descriptive error, or even better, a compile-time error!
I’m guessing I have to run go.delete() on a game object script rather than a module. It would be nice to at least get a more descriptive error, or even better, a compile-time error!
You can run go.delete() from a module if the script calling into the module is a go-script. My guess is that you have called that function from a GUI-script - in which case all go-functions will fail (and similarly it will fail if you call a gui-function in the scope of a go-script)
@Johan is correct. It sounds as if you try to do go.delete from a gui_script.
The error message could be improved quite a bit though… @sicher, we should probably add this to the backlog as something to go through before the public launch.
Ah, that’s true, I did call it from a GUI script. I’m messaging an object now instead, thanks!