Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

As mentioned earlier, yes - GameMaker now allows to read/write GML values on C++ side (like this), which makes a number of actions faster as far as this extension goes.

Thank you very much for your reply, which makes me look forward to the release of the v3 version,and recently, I ran into a small issue:

setmetatable(_G, {
    __index = function(s, n)
        if(type(s)=="table")then
            <Call GML Function ...>
        end
         return _G[n]
    end
}
);

I want to monitor user access to the Lua script's Table with this code, but it doesn't work

When calling the GML function.

The console prompts the following message :PANIC: unprotected error in call to Lua API (attempt to yield from outside a coroutine)

What is the reason for this and how can I solve this problem?


That’s the limitation of the approach used in V2 - to call GML code, Lua state is paused, but Lua does not support pausing states in some situations (such as in a meta-methods).