Put this code at the start of custom_limit_gauge:
//Variables if (!variable_struct_exists(custom_script_struct, "limit_gauge")) { custom_script_struct.limit_gauge = 0; }
And this code at line 8 of hud_limit_gauge:
//Variables if (!variable_struct_exists(_player.custom_script_struct, "limit_gauge")) { _player.custom_script_struct.limit_gauge = 0; }