Page 1 of 1

Typo....

Posted: 16 Mar 2006, 16:58
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")

Posted: 16 Mar 2006, 20:39
by goodguy20k
Sparticus, the typo hound dog. You're amazing... :)

Posted: 16 Mar 2006, 21:03
by Sparticus
hehe... I try :)

Posted: 17 Mar 2006, 16:58
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

Posted: 17 Mar 2006, 17:02
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.