Random Room Generation in Game Maker Studio

Depending on how things turn out with the theme, I made this random room generator to prepare myself. It works 99% of the time (only sometimes do the rooms not connect perfectly) and it creates a 2D array that can be manipulated afterwards. It is provided as-is, although I may help you if you need it.

You can view the code here: https://gist.github.com/TomboFry/e27724f587fe36d2ad75

Below are some examples of the script in action (if I draw each element of the array to the screen):

Generating 15 rooms with widths/heights between 3 and 4:
roomgen-15-3-4-3-4

Generating 3 rooms with widths/heights between 5 and 12:
roomgen-3-5-12-5-12