Set the name of a room. Provide a nil
argument to remove the current name.
This function generates a change.
room.set_name(name_or_nil)
Argument | Type | Description |
---|---|---|
name_or_nil |
str/nil (required) | Name for the room or nil to remove the name. |
The value nil
.
This code creates a room, gives the room a name and uses the name() function to return the name.
.room = room();
.room.set_name('my_room');
// Return the name
.room.name();
Return value in JSON format
"my_room"