Skip to main content

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

[Fixed in 1.0.31+] A certain script name produces an error

A topic by JamJamTeam created Aug 22, 2020 Views: 300 Replies: 4
Viewing posts 1 to 5
(1 edit) (+1)

Hi, I found another bug. This is a very strange one. So I create a new project, import GMLLive, create one object and one script.

I called the script "enums" and this seems to be the problem. (If you want to recreate the error, here is the code:)

// THE SCRIPT

enum testEnum {
firstEntry
}

// OBJECT CREATE EVENT

variable = 0;

// OBEJCT STEP EVENT

if (live_call()) return live_result;
if (variable == testEnum.firstEntry) show_debug_message("test");


When I do this I get the following error when reloading the step event. The error only occurs when I call the script "enums" every other name seems to work fine. (I renamed it and everything works again but I thought it still could be useful to you) Took me hours to track that down :P

############################################################################################
ERROR in
action number 1
of Async Event: HTTP
for object obj_gmlive:

array_set :: argument 0 is not an array
 at gml_Script_gml_std_gml_internal_ArrayImpl_push (line 8786) -        l_arr[@l_i] = l_val;
############################################################################################
gml_Script_gml_std_gml_internal_ArrayImpl_push (line 8786)
gml_Script_anon_gml_builder_gml_GlobalScript_GMLive_30556_gml_builder_gml_GlobalScript_GMLive (line 766) -                                           gml_std_gml_internal_ArrayImpl_push(self.enums, l_e);
gml_Script_anon_gml_builder_gml_GlobalScript_GMLive_51586_gml_builder_gml_GlobalScript_GMLive (line 1186) -                                           if (self.build_line()) return true;
gml_Script_anon_gml_builder_gml_GlobalScript_GMLive_54960_gml_builder_gml_GlobalScript_GMLive (line 1247) -               if (self.build_outer(l_first, undefined, 0, false)) return true;
gml_Script_gml_builder (line 1327) -               self.build_loop(l_src.main);
gml_Script_gml_program (line 3172)
gml_Script_live_update_script_impl (line 10355)
gml_Script_live_async_http_1 (line 9117) -               live_update_script(l_name, l_ident, l_code);
gml_Script_live_async_http (line 9207) -        live_async_http_1(l_map);
gml_Object_obj_gmlive_Other_62 (line 1) - live_async_http();


Developer

Hello, this is a GameMaker bug - if a .field name matches a name of a resource, results are unusual.

I reported it a month ago, but it is as of yet not fixed,

I'll probably go back to having everything be named inst.i_name for the next build.

Ah I see, thank you :)

Thank you  for posting this JamJam. I had the exact same issue, because I also had a script called enums, and I was completely at a loss as to what was causing my problem!

Developer

Added back a workaround for this in 1.0.31+.