Typo....

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
Sparticus
Posts: 227
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Typo....

Post by Sparticus »

At this link :
http://www.smartfoxserver.com/docs/docP ... /index.htm

under "UserExit" it has an example how to detect when a user exits a room... The code says you need to do this :

Code: Select all

if (evt.name == "userExit")
when in fact you need to do this :

Code: Select all

if (evt.name == "userLost")
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

Post by goodguy20k »

Sparticus, the typo hound dog. You're amazing... :)
Sparticus
Posts: 227
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Post by Sparticus »

hehe... I try :)
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Hmmm... I don't think that's a typo.

There are two different and separate events:

userExit: this is fired when a user exits from a room

userLost: this is fired when a user disconnects
Lapo
--
gotoAndPlay()
...addicted to flash games
Sparticus
Posts: 227
Joined: 27 Feb 2006, 17:44
Location: Canada
Contact:

Post by Sparticus »

oh. I guess that makes sense. I had just cut and pasted the example in the docs... and then had my user finish their game and close their window (and therefore I guess their connection was lost).

Good to know it catches both types of users leaving a room.
Post Reply