Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Self returns the variables held in my game's controller object "o_control"

That does sound like you are re-binding it to your object somewhere. And how does the call and assignments of the variable look like?

What exactly does "re-binding" mean and how can I avoid it is probably the better question I should be asking. Not seeing anything in the manual/cheat sheet about re-binding.

I'm using the live_auto_call macro in both my control object begin step and in scripts that can be run in the begin step as well as other times from the control object. Idk if any of that helps. I'm not too sure what you mean by the "assignments of the variable" 

The method function binds a function/script to an instance or a struct.

When you have something like

// Create
live_auto_call;
myCoolFunction = function() {}

What executes is roughly equivalent to

live_auto_call;
var context = {};
context[$"live:self"] = self;
context[$"live:function"] = /* a struct with representation of updated code */;
// ... a few more fields
myCoolFunction = method(context, gml_thread_method_script);

This way gml_thread_method_script knows both which instance it should run for, and what code it should run.

If you later do

myCoolFunction = method(..., myCoolFunction);

myCoolFunction would no longer have live:self/live:function attached to it and GMLive wouldn’t know what code to run, hence the error.

Variable assignments are explained in the manual.
You are probably familiar with these if you have 758 lines of code in a Step event and are using Scribble.
Also include the line of code that’s on o_control➜Step➜Line 758.