Skip to main content

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

Hard to tell from that alone, but try removing the outer-most live_auto_call - we don’t have true closures so GMLive can’t re-create some of the behavior with static / Script.staticFunc().

That didn't seem to work. I have a "live_auto_call" at the beginning of the event that calls this function, but I'll admit I don't fully understand the nitty gritty of how GMLive works. Will it just not work with static functions? Or could this have something to do with calling a nested function? The code I'm trying to test is in the Draw GUI event, so the code I've shared isn't even directly relevant and shouldn't need to change at runtime, which is why I'm confused that it stops working only after reloading with GMLive.

IIRC the specific case that’s weird is

function scr_some() {
    live_auto_call;
    static counter = 0;
    static a = function() { counter += 1 }
}

and then doing scr_some.a()

If you can reproduce this in a blank project, please email me a copy and I’ll have a peek

If you don’t want to do anything, I guess you can move the code to a different (non-static) script, but I can’t tell you from the information so far whether that’s actually what’s happening.