Page 1 of 1
How to get the username who is lost..
Posted: 06 Jul 2010, 04:53
by jeeteshb
hi,
How can i get the username of the user who is Lost because of idle state. I want to save isActive to false in the database whenever the user is lost. The userLost event in the handleInternalEvent will give username as null.
Many thanks,
J
Posted: 18 Jul 2010, 20:08
by Lapo
Can you show the server code that you use?
The userLost event sends the User object itself. I don't understand how the name could possibly be null.
Please provide more details.
Thank you
Hi I was doing this in server
Posted: 06 Aug 2010, 04:54
by jeeteshb
In public void handleInternalEvent(InternalEventObject evt)
{
if(evt.getEventName().equals(InternalEventObject.EVENT_USER_LOST))
{
String nick = evt.getParam("nick");
String pass = evt.getParam("pass");
System.out.println("nick = <"+nick+"> pass = <"+pass+">");
}
}
it's printing NULL , NULL ..
Posted: 06 Aug 2010, 06:35
by Lapo
Those parameters are wrong.
You seem to be referencing the parameters of the Login event.
Please make sure to check the documentation for a list of names of the event parameters.
http://smartfoxserver.com/docs/docPages ... bject.html