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.