Skip to main content

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

room_height is read-only in gmlive

A topic by matthewstone218 created Nov 07, 2023 Views: 150 Replies: 2
Viewing posts 1 to 2

room_height is read-only in gmlive and so writing this variable cause error.

But it's not a read_only variable.

https://manual.yoyogames.com/#t=GameMaker_Language%2FGML_Reference%2FAsset_Manag...

Developer

GMLive relies on the fnames file (found in the runtime directory) for function and variable signatures, but this file is known to be occasionally unreliable, including this case

// # = constant
// * = readonly
// @ = instance variable
// & = obsolete
// $ = US spelling
// £ = UK spelling
// ! = disallowed in free
// % = property
// ? = struct variable
// ^ = do not add to autocomplete
// ^feature_flag = do not add to autocomplete if the feature flag is disabled
// [name] = optional argument

...

room
room_first*
room_last*
room_width*
room_height*

You can workaround this by adding the following to the end of obj_gmlive’s Create event:

gml_var_add("room_width", function(l_set,l_val){
	if(l_set){
		room_width = l_val;
		return undefined;
	} else return room_width;
});
gml_var_add("room_height", function(l_set,l_val){
	if(l_set){
		room_height = l_val;
		return undefined;
	} else return room_height;
});

thank you!