Dispatched when an error occurs during the creation of a room.
Usually this happens when a client tries to create a room but its name is already taken.
Usually this happens when a client tries to create a room but its name is already taken.
- error (String)
- the error message.
Version:
SmartFoxServer Basic / Pro
The following example shows how to handle a potential error in room creation.
CopyC#
SFSEvent.onCreateRoomError += OnCreateRoomError; Hashtable roomObj = new Hashtable(); roomObj.Add("name", "The Entrance"); roomObj.Add("maxUsers", 50); smartFox.CreateRoom(roomObj); public void OnCreateRoomError(string error) { Trace.WriteLine("Room creation error; the following error occurred: " + error); }