More trouble

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

More trouble

Postby goodguy20k » 03 Mar 2006, 03:07

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. ;-)
User avatar
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

Postby goodguy20k » 03 Mar 2006, 03:16

Ok, well, I'm tring to just view some things like smartFox.myUserName, smartFox.myUserId, and smartFox.playerId. But smartfox.amIModerator returns currect. Go figure...
User avatar
Lapo
Site Admin
Posts: 21588
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Mar 2006, 06:42

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

:)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

Postby goodguy20k » 03 Mar 2006, 15:03

Oh, you mean... Use the search feature on this forum?! :shock: But! But! Then I wouldn't get to talk with you, Master Lapo! 8) Oh well... I guess I could learn from some past posts... Once in a while... :roll:
User avatar
Lapo
Site Admin
Posts: 21588
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Mar 2006, 15:15

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)

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?
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

Postby goodguy20k » 03 Mar 2006, 20:18

I understood, just had to show my humiliation and thanks for your tip.
User avatar
Lapo
Site Admin
Posts: 21588
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 03 Mar 2006, 22:29

humiliation?? :?: :shock:
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 13 guests