Of course, I forgott the whole LUA syntax again in the meantme... nay!
And of course I'm immediately facing a problem that doesn't make any sense at all to me... oh wey!
It's fairly simple: The script I wrote (rather extensive, actually) started to produce assertion failures in SmartPtr.h as soon as I registered an event. Oh well, I thought, nothing ever works in the first go, so let's find out where the problem is!
I started to remove code in hope that I'll eventually get to the point where the error doesn't happen anymore, so I'd know what's wrong.
Strangely, I didn't reach this point. And I have nothing left to take away! No really, nothing. Here's what the file looks like at the moment:
Code: Select all
local onGameStart = function ()
end
local onEnterSystem = function(ship)
end
local onFrameChanged = function (body)
end
Event.Register("onFrameChanged", onFrameChanged)
Event.Register("onGameStart", onGameStart)
Event.Register("onEnterSystem", onEnterSystem)
If I don't register the events, it doesn't produce a crash (no matter whether in this state or in the full version, which are some 350 lines at the moment). But of course it doesn't do anythig then, either.
If I do register the events, it doesn't work even if I literally don't do anything.
Clearly there must be something ridiculously basic I'm overlooking. I hope someone has a good laugh at this and then tells me what I'm doing wrong...