ENIGMA has a weird variable leak that had utterly confused me for a while. I narrowed it as best I could. Let me start by saying I honestly have no idea what is causing this problem. At all.
Reproduce steps:
Create a script with code:
w = 777;
show_message("Width: "+string(w));
h = display_get_height();
show_message("Width: "+string(w));
show_message("Height: "+string(h));
Create a room, and in the init code, call the script.
Create an object with an event that calls the script in the room (e.g. spacebar up event).
You'll notice when called from the room creation code, the output is something like "777, 1080, 1080"
But when called from the object, it's "777, 777, 1080"
Somehow in the room creation code the variable w is being overwritten by either h or display_get_height(). I thought this might be a case that somewhere in the room there's an internal variable named w that is fucking up my previously set value.
IDK PLZ FIX THIS IS WIGGIN ME OUT MAN
I tried to look at ENIGMA's code myself but I couldn't find anything immediately obvious in window_set_size or display_get_height so it's probably deeper in ENIGMA's internals than I care to go.
I was bored so I also uploaded a bare minimum example of this sorcery happening:
https://dl.dropboxusercontent.com/u/1215621/whatthescope.egmp.s. using the windows exe uploaded on 2/18 idk what revision that is