How to get the username who is lost..

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

jeeteshb
Posts: 7
Joined: 24 Jun 2010, 08:33
Location: India
Contact:

How to get the username who is lost..

Postby jeeteshb » 06 Jul 2010, 04:53

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
Game Developer
Jeetesh Bhoria
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Jul 2010, 20:08

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
Lapo
--
gotoAndPlay()
...addicted to flash games
jeeteshb
Posts: 7
Joined: 24 Jun 2010, 08:33
Location: India
Contact:

Hi I was doing this in server

Postby jeeteshb » 06 Aug 2010, 04:54

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 ..
Game Developer

Jeetesh Bhoria
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 06 Aug 2010, 06:35

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
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 14 guests