Skip to content

Next: GetRoomData

Archie_UwU edited this page Jan 4, 2024 · 1 revision

Gets the deserialized contents of a GameMaker room.

Syntax

AurieStatus GetRoomData(
    [in]  int32_t RoomID,
    [out] CRoom*& Room
);

Parameters

RoomID

The room number of the room, the data of which is retrieved.

Room

A reference to a pointer-sized buffer into which the address of the CRoom object is written. If the function fails, the buffer referenced by this parameter is left untouched. In the name of safety, this structure is normally opaque. To remove this safeguard, see Enabling internal structure access. The pointer written into this buffer is guaranteed to remain valid for the duration of the room's existence.

Note

Using this function to get the active room may produce unexpected results (eg. the room having no active instances) due to how the GameMaker engine works. To get a pointer to the currently active room, use the GetCurrentRoomData function.

Return Value

The function returns AURIE_SUCCESS on success, otherwise returns a matching error code. If the information needed for looking up rooms isn't available, the function returns AURIE_MODULE_INTERNAL_ERROR. If the RoomID index isn't a valid room, the function returns AURIE_OBJECT_NOT_FOUND.

Quick Access

Documentation

Writeups

Clone this wiki locally