SmartFoxServer Silverlight API
SFSEvent..::.OnCreateRoomErrorDelegate Delegate
Namespaces ► SmartFoxClientAPI ► SFSEvent ► SFSEvent..::.OnCreateRoomErrorDelegate
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.
Declaration Syntax

C# | Visual Basic | Visual C++

    public delegate void OnCreateRoomErrorDelegate(
    	string error
    )

    Public Delegate Sub OnCreateRoomErrorDelegate ( _
    	error As String _
    )

    public delegate void OnCreateRoomErrorDelegate(
    	String^ error
    )

Parameters

error (String)
  the error message.

Remarks

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to handle a potential error in room creation.
CopyC#

    SFSEvent.onCreateRoomError += OnCreateRoomError;

    NewRoomDescriptor roomObj = new NewRoomDescriptor("The Cave", 15, true);
    smartFox.CreateRoom(roomObj);

    public void OnCreateRoomError(string error)
    {
        Debug.WriteLine("Room creation error; the following error occurred: " + error);
    }

See Also
CreateRoom(NewRoomDescriptor, Int32)

Assembly: SmartFoxClientAPI_Silverlight (Module: SmartFoxClientAPI_Silverlight) Version: 1.0.0.0 (1.0.0.0)