This function will create a new, empty, room and add it to your game, returning its index to be stored in a variable for all further codes that deal with this room. Note that each room is permanently added to the game until the executable is closed, ie: rooms added through code cannot be deleted again. This has important implications for memory use and so you should use this function with care.
global.myroom = room_add();
This will create a new room and store its index in the variable "global.myroom". It will then set its width to 640 pixels, its height to 480 pixels, and its persistence to false.