As hinted at in my title, I don't know exactly what's wrong. Here's the problem, as far as I can tell:
Right now, I'm doing a custom login extension. (This happens on the example for custom logins.)
I successfully "login" but the _global.myName is not set. That worries me.
Then I call (clientside) smartfox.getRoomList(). I wait for the onRoomListUpdate to fire and the perform this.autoJoin(). (Yes, there is a room defined in the Config.xml for AutoJoin.) But when I go to check all the settings, I get a lot of undefined.... Not good.
Ok... Scratch most of that... Just figured out I wasn't waiting for the onJoinRoom event.... Uh... DUH!!! I feel dumb...
But I still wonder about the _global.myName being undefined... It's straight from your example, Lapo, so don't blame my code! Just kidding. It's probably my server settings.
More trouble
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
I successfully "login" but the _global.myName is not set. That worries me.
Since it's a custom login you will have complete freedom on what data you pass back to the client if the login is successfull.
You will need to pass the userID and userName by yourself, if you need them.
We discussed something similar here > viewtopic.php?t=225&highlight=myname
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
I mean that the same problem has already been discussed in that topic.
You can notice at the very beginning of it that code explains it all (I believe)
Not only you send the "logOK", but also the id and name of the client
Makes sense?
You can notice at the very beginning of it that code explains it all (I believe)
var user=_server.instance.getUersByChannel(chan);
response._cmd="logOK";
response.name=user.getName();
response.uId=user.getUserId();
Not only you send the "logOK", but also the id and name of the client
Makes sense?
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 25 guests