getActiveRoom()

Availability:

SmartFoxServer Lite / Basic / Pro

Usage:

smartFox.getActiveRoom()

Description:

Returns a propertylist describing the room where the user is currently in.

Check the Room Properties for more info on the properties in the propertylist.

NOTE: SmartFoxServer allows users to be logged in two or more rooms at the same time. If your multiuser application makes use of this feature this API method becomes useless and you should track the room ID(s) of your clients manually, for example by keeping them in a list.

Parameters:

none    

Returns:

The room object .

Example:

put smartFox.getActiveRoom()
-- [#myPlayerIndex: 0.0000, #variables: [:], #userList: [#0: [#pid: -1.0000, #isMod: 0, #isSpec: 0, #variables: [], #name: "username", #id: 0.0000]], #specCount: NAN, #userCount: 1.0000, #description: "", #updatable: 0, #limbo: 0, #priv: 0, #game: 0, #temp: 0, #maxSpectators: 0.0000, #maxUsers: 50.0000, #name: "The Hall", #id: 1.0000]

See also: