joinRoom Error! :O

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

Moderators: Lapo, Bax

Aiidenb
Posts: 263
Joined: 16 Aug 2010, 22:08
Location: England
Contact:

joinRoom Error! :O

Postby Aiidenb » 22 Aug 2011, 19:17

Hello there! I have made a Search Room (House) System but it seems to have a error..

On the "Search System" you can search a id that get a "House Number" from the PHP and Database where name = name.

When a user signs in to thier account, under setupMyAvatar() it creates a dynamic room;

Code: Select all

Hut = new Object();
rm = "i"+_global.myName;
Hut.name = rm;
Hut.password = "";
Hut.maxUsers = 10;
smartfox.createRoom(Hut);


Next I put this on a button;

Code: Select all

on(release){
_root.smartfox.joinRoom("i"+_root.id);
   trace("Name:"+_root.id);
   _global.currentHouse = _root.id;
   _root.gotoAndStop("House");
   _root.HouseID._visible = false;
}

I then added a input text box with a var of '_root.id'.

TESTING..
It creates the dynamic room as you can see;

Code: Select all

[Received]: <msg t="sys"><body action="roomAdd" r="0"><rm id="143" priv="0" temp="1" game="0" max="10" spec="0" limbo="0"><name>iRyan</name><vars /></rm></body></msg>


But when i join the Ryan room (iRyan) when they ARE Online it doesnt join that room, It doesnt join no room.

I can also see the users room on the userList_lb, so they are creating fine.

It does trace;

Code: Select all

Name:Aiden


This did work before, It's just not really working on new users. :roll:

Please help! Thanks, Aiden :)
Quackbay - The online virtual world for kids!

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 104 guests