Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

[A mystery] Variable Index Out of Range

A topic by Papadoge created Apr 15, 2021 Views: 742 Replies: 6
Viewing posts 1 to 4
(1 edit)

Hello. Love this plugin but I'm having trouble figuring out how to read the error messages to know what line of code I need to be troubleshooting. 

I thought maybe it would be this: ` called from obj_multi_tool:Draw_0[L148,c8]` meaning the mistake is on line 148, but when I comment that line out nothing changes and it says the mistake is on line 149, the next uncommented line, which is just setting a font variable.

I can include more of my code if needed but wondering if I'm maybe reading the error output wrong or there's something else this error message is saying that I'm not understanding.

`

Push :: Execution Error - Variable Index [32] out of range [16] - -7.l_st(104301,32)

 at gml_Script_vm_group_local_on_local_set (line 14449) - var l_r=l_st[l_i1];

", script : "gml_Script_vm_group_local_on_local_set", stacktrace : [ "gml_Script_vm_group_local_on_local_set (line 14449)","gml_Script_anon_gml_thread_gml_GlobalScript_GMLive_382568_gml_thread_gml_GlobalScript_GMLive (line 12021) - var l_ar1=l_handler(l__gthis,l_act);

","gml_Script_anon_gml_program_gml_GlobalScript_GMLive_107664_gml_program_gml_GlobalScript_GMLive (line 2779) - l_th.h_exec();

","gml_Script_live_call (line 10859) - var l_th=l_pg.h_call_v(l_scriptName,l_vals,false);

","gml_Object_obj_multi_tool_Draw_0 (line 5) - if (live_call()) return live_result;

" ], line : 14449 }

 called from game:gml_std_haxe_Exception_caught:9047

 called from game:anon_gml_thread_gml_GlobalScript_GMLive_382568_gml_thread_gml_GlobalScript_GMLive:12031

 called from game:anon_gml_program_gml_GlobalScript_GMLive_107664_gml_program_gml_GlobalScript_GMLive:2779

 called from game:live_call:10859

 called from game:obj_multi_tool_Draw_0:5

 called from 0

 called from obj_multi_tool:Draw_0[L148,c8]

`

Developer

Can you email me a sample project that triggers this (copying the object to a new project might be enough)? I believe that you are the second person to report this, but the error is seemingly impossible.

Did you get my email?

Developer

I did, but so far I was not able to reproduce your crash after stubbing out the missing variables by adding

function GAME_CONTROLS() {}
enum mods {laser_beam}
instance_create_depth(x, y, depth, obj_player_suit);
key_secondary_press = 0;

to Create and creating an obj_player_suit which does

enum player_state { suit }
has_control = 1;
state = player_state.suit;

on Create.

A more specific example might be necessary - it is most likely a specific line of the code, so making a backup of the draw event and removing the code from it until you find the offending bit should help to isolate the problem.

OK will do, thanks for digging into this for me. I'll let you know how it shakes out.

Sure I can do that, but you would need the game to actually run, right? If I just copied over the single object then a lot of dependencies would have to come with it. Or are you just wanting to see the code for the event that is triggering the error and it doesn't matter if it can run or not?

Sent you an email with the single object project just now.