Bad room Id

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Bad room Id

Postby BigFIsh » 04 Mar 2008, 22:32

SmartFoxServer:
[WARNING] > SysHandler -> Bad room id. Action: pubMsg >> java.lang.NumberFormatException: For input string: "null"

This error occurs randomly. Sometimes it works, sometimes it doesn't.

I'm using "simpleChat" as my Zone at the moment.

I think it has to do with the smartfox.onJoinRoom = function(myRoom:Room) { - sometimes it faile to excute.

Any ideas?
Last edited by BigFIsh on 04 Mar 2008, 23:03, edited 2 times in total.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 04 Mar 2008, 22:47

I did some further testing.. this is very odd..

Upon joining a room, using simpleChat example, this message ">> Room [The Hall] Joined" should be shown in the chat area.

The interesting thing is.. when publishing the .swf file as .html for my browser (F12), it works every 2nd time. i.e. I have 12 simpleChat.html running in one browser and 6 out of 12 shows the "message", rest is blank.

When the chat box is blank - I type in a message, and I get the bad room id error.

I'm testing from the same computer which runs the server.

Hope this narrows things down.
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 04 Mar 2008, 23:55

I found the problem...

... it's all good now...
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Mar 2008, 07:50

BigFIsh wrote:I found the problem...

And the problem was... ?
Paolo Bax
The SmartFoxServer Team
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 05 Mar 2008, 08:49

if (evtQueue.length > 0)
{
smartfox.onRoomListUpdate(evtQueue[0])
delete evtQueue
}

I forgot about that little piece of code :lol:
warhell
Posts: 199
Joined: 18 Aug 2007, 16:49
Location: Silicon Valley, CA
Contact:

Postby warhell » 21 Apr 2008, 05:43

I have the same exactly problem, but I can't find the solution. I think it has something to do w/ what the whole join room thing.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 21 Apr 2008, 16:11

Correct, if you send a message without being joined in any room you'll get that error. Make sure to handle the join errors properly on the client side to avoid that the client can send requests after a join failure.
Lapo
--
gotoAndPlay()
...addicted to flash games
warhell
Posts: 199
Joined: 18 Aug 2007, 16:49
Location: Silicon Valley, CA
Contact:

Postby warhell » 22 Apr 2008, 01:27

The thing is that the nJoinRoomError doesn't get called. I test it a lot, just run the simpleChat in firefox and you will eventually get someone who is in the game, but not the userlist.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 22 Apr 2008, 09:10

if it doesn't get called there's no error then :)

I test it a lot, just run the simpleChat in firefox and you will eventually get someone who is in the game, but not the userlist.


Can you better explain? The game? which game?
Please try to be as clear as possible and explain the steps that you execute and the problems you get.

The above problem has been fixed so I don't know exactly what you are talking about. (maybe starting a new thread with a clear description of the problem would have been more appropriate)
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 33 guests