Dont let Hutnews know about this
Yokin
Creator of
Recent community posts
live_auto_call
seems to cause a compile error when compiled with YYC, and more specifically that seems to be related to the macro’s argument_count
and argument
parts
I guess that’s related to why GameMaker used to not allow it? Oh well
Oh also, setting the live_enabled macro to 0 causes the live_auto_call macro to not get initialized I think (making it cause an error in the VM)
Having this slightly strange syntax highlighting with constructors, although it might be intentional.
Static variables set to functions are highlighted like functions, while ones set to methods are highlighted like instance variables. Also arguments and variables inside sub-functions get highlighted the same as the constructor’s arguments if they share the same name.
Nothing major, I just figure it’s worth reporting.
Also are binary literals meant to be supported? I assume not, since they don’t do any highlighting and display an error in the sidebar right now
On live reloads it seems like the precision of modulo is reduced, or something like that.
Essentially this code:
if(live_call()) return live_result;
show_debug_message(10000000000000001);
show_debug_message(10000000000000001 % 2);
Results in this debug output:
It seems to work normally with one less digit, but it does cause minor issues for fetching the digits of large binary numbers. Using the most recent version of GMLive!!
Raw code if you want to test it yourself
function Test(_value) constructor {
if(live_call(_value)) return live_result;
obj_list = [];
value = _value;
static get_sum =function()/*=>*/ {
var _sum = value,
_objIndex = 0;;
repeat(array_length(obj_list)){
_sum += obj_list[_objIndex++].get_sum();
}
return _sum;
};
static add_obj =function(_obj)/*=>*/ {
array_push(obj_list, _obj);
};
}
var _obj = new Test(3);
_obj.add_obj(new Test(5));
_obj.add_obj(new Test(9));
show_debug_message(_obj.get_sum());
This might be one of the known unfixable constructor issues. BUT:
This code works initially, but hard crashes after a live reload with some kind of memory access error. Nothing changed in the live reload besides the addition of a semi-colon to make it reload.
Log:
Entering main loop.
**********************************.
17
Pause event has been registered for this frame
Pause event has been unregistered
[live][11/16/2022 4:33:42 PM] Reloaded Test.
Runner exited with non-zero status (0xc0000005 = 3221225477)
Compile Ended: 16:33:42
Minor bug with static
that you may already know about - doing something like:
function test(_value) constructor {
if(live_call(_value)) return live_result;
value = undefined;
set_value(_value);
static set_value =(_value)=> {
value = _value * 2;
};
}
causes an error about the set_value
script being undefined after the live-reload occurs (putting the set_value
call after the static definition works as normal).
I tried adding one myself, but it seems like it only works for object events and not functions (I get this error when it tries to reload a function using the macro: Couldn't find functionName in 'C:\...\scrName.gml'
).
Anything akin to #macro LIVE if(live_call()) return live_result;
, for quick and explicit convenience like this:
function cool_script(){
LIVE
draw_set_color(c_yellow);
draw_sprite(sprite, 0, 50, 50);
}
(Making this a request cause I assume it manually parses the script file for the live_call()
or something like that, and supporting custom macros for that might be difficult).
NTTE discord channel https://discord.com/channels/145126902074441729/639544266364026880
That’s a bug with 9944, and normally it wouldn’t cause a crash but it seems like this file is missing from your NTT installation:
https://cdn.discordapp.com/attachments/218608636010692608/876181067269287966/catch_error.dll
Downloading that and putting it in the same folder you installed NTT 9944 to should fix it