Skip to main content

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

"variable_struct_set: illegal to use empty names"

A topic by hamrath created 85 days ago Views: 136 Replies: 5
Viewing posts 1 to 4

Hi YAL,

I get the following error, when I add obj_gmlive to my first room and start my project. I'm using latest GMS and runtime. I followed the docs and except for add obj_gmlive I did nothing special.

___________________________________________

############################################################################################

ERROR in action number 1

of Create Event for object obj_gmlive:

variable_struct_set: illegal to use empty names

 at gml_Script_live_api_asset_add (line 4309) -        variable_struct_set(live_api_asset_index,l_name,l_index);

############################################################################################

gml_Script_live_api_asset_add (line 4309)

gml_Script_live_bits_gmlive_indexer_add_assets (line 14208) -                      live_api_asset_add(animcurve_get(l_id).name,l_id);

gml_Script_live_init (line 13594) -               live_bits_gmlive_indexer_add_assets();

gml_Object_obj_gmlive_Create_0 (line 15) - live_init(1, "http://localhost:5100", "");

Developer (1 edit)

If you run the game in debug mode and check variables in the Local panel when an error pops up, what animation curve is that? Doesn鈥檛 sound very normal for these to not have a name

(1 edit)

Oh, sorry to mention that. I don't have any animation curves. But I just checked, Stanncam uses them. And with a fresh project and Stanncam installed the error occurs again. I'll ask there next, I guess. 

I found the problem and its solution. I had to disable "Automatically remove unused assets when compiling" in the Game Options. Now everything works fine. Wish I found it sooner, would have spared me a lot of recompiling while position some draw_line() and draw_rectangle(). 馃槄

Developer

That should be fixed in the latest version of GMLive, but if you鈥檙e still getting the error, that鈥檇 be a little weird as I have switched to using asset_get_ids specifically to avoid this issue.

I checked the full log of GameMaker and found those lines:

-------------------------------------------------------
NOTE: 9 Unused Assets found (and will be removed) -
GMAnimCurve :: stanncam_ac_bouncy, stanncam_ac_linear
GMObject :: obj_stanncam_zone_1side, obj_stanncam_zone_corner
GMSprite :: spr_pixel_side_Underwater, spr_stanncam_zone_1side, spr_stanncam_zone_corner, spr_tile_bg, spr_underwater
-------------------------------------------------------

I'm not sure, what GameMaker tries to remove here, as some of the elements don't even exist in my project, e.g. spr_tile_bg or spr_underwater.