joinRoomInRange API with Corona Labs doesn´t work‏

0 votes

Hello,

 
I´m trying to make a test project with Corona Labs and your AppWarp Service. I created a room with client 1 and tried to join that room with client 2.
But client 2 can´t find the room created by client 1.
 
I´m using the following code to create a room:
appWarp.createRoom (tostring(os.clock()), USER_NAME, 2, nil)
 
and the following code to join a room:
 appWarp.joinRoomInRange(1, 2, false)
 
 
Why client 2 can´t find the room created by client 1?
 
Thanks and best regards,
Alexander
asked Feb 27, 2014 in AppWarp by aglem (10 points)

1 Answer

0 votes

joinRoomInRange(1, 2, false) 

means that there must already be at least 1 user in the room and at most 2. After you create the room, there are 0 players in it. So the above API will fail. The client who creates the room should join it using the roomId. The second client can then do joinRoomInRange(1, 1, false).

Please see the following corona example which does the above process -

http://appwarp.shephertz.com/game-development-center/corona-realtime-turn-based-game-tutorial/

answered Feb 28, 2014 by dhruvc (1,099 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...