Appwarp S2 cocos2d-x SDK: 'getRoomsWithProperties' and 'joinRoomWithProperties' match making issue

0 votes

Hi,

I have trobule using  'getRoomsWithProperties' and 'joinRoomWithProperties' match making,

My rooms are created from server with define properties and i calling match making api

std::map<std::string,std::string> props;
props.insert(std::make_pair<string, string>("RoomDefaultAmount", "10"));

AppWarp::Client::getInstance()->getRoomWithProperties(props);

AppWarp::Client::getInstance()->joinRoomWithProperties(props);

When i use room info api with room id direct i get room details with properties.

AppWarp::Client::getInstance()->getLiveRoomInfo("150304384");

what could be issue with api calling ?

 


 

asked Feb 11, 2015 in AppWarpS2 by imobdevdevice (10 points)

1 Answer

0 votes

HI,

We tried testing getRoomWithProperties() method and joinRoomWithProperties() and they are working fine. This is what we did :
 

std::map<std::string,std::string> properties;
properties.insert(std::make_pair<std::string, std::string>("age","21"));
warpClientRef->createRoom("testRoom","admin",5, properties);
warpClientRef->getRoomWithProperties(properties);
warpClientRef->joinRoomWithProperties(properties);
 
What result code are you getting in onGetMatchedRoomsDone and onJoinRoomDone callbacks?
 
Thanks
answered Feb 11, 2015 by Suyash Mohan (900 points)
I am not creating room from user end.
I have created rooms from server side and set properties there and I’m using like

        std::map<std::string,std::string> props;
        props.insert(std::make_pair<std::string, std::string>("RoomDefaultAmount","10"));
        AppWarp::Client::getInstance()->getRoomWithProperties(props);
For above request ,i get Result code 0 but room data zero (no room found).

Room with above properties exist in server side.

When i use

        std::map<std::string,std::string> props;
        AppWarp::Client::getInstance()->getRoomWithProperties(props);

it list all rooms from server.

Have look at image here server room properties

https://www.dropbox.com/s/781h6qt6m0sxptv/Screen%20Shot%202015-02-11%20at%2012.03.13%20pm.png?dl=0
If you create room at client side, does then join room with properties works?
We have tested with rooms created with API not dashboard. Give us sometime to test against static rooms also.
When i create room on  client side. it gets room details.
====
AppWarp::Client::getInstance()->createRoom(AppDelegate::sharedDelegate()->random_string(7),"admin",5, props);
  std::map<std::string,std::string> props;
  props.insert(std::make_pair<std::string, std::string>("RoomDefaultAmount","50"));
  
AppWarp::Client::getInstance()->getRoomWithProperties(props);
====
 Cocos2d: virtual void SearchRoom::onCreateRoomDone(AppWarp::room)
 Cocos2d: event : 0
 Cocos2d: revent.owner :
 Cocos2d: revent.roomId : 2028260462
 Cocos2d: revent.name : kebueeg
 Cocos2d: virtual void SearchRoom::onGetMatchedRoomsDone(AppWarp::matchedroom)
 Cocos2d: roomSize: 1
 Cocos2d: ****
 Cocos2d: roomID 2028260462
 Cocos2d: found kebueeg
 Cocos2d: ****

If i request to get room with properties for newly create room it does list room, but does not list room created from server side.

  std::map<std::string,std::string> props;
  props.insert(std::make_pair<std::string, std::string>("RoomDefaultAmount","50"));
  
AppWarp::Client::getInstance()->getRoomWithProperties(props);

Cocos2d: keys : RoomDefaultAmount --- Value : 50
Cocos2d: virtual void SearchRoom::onGetMatchedRoomsDone(AppWarp::matchedroom)
Cocos2d: roomSize: 1
Cocos2d: ****
Cocos2d: roomID 2028260462
Cocos2d: found kebueeg
Cocos2d: ****
Give us some time. We will need to debug our SDK and reproduce your issue on our end to find possible solution
@suyash ,, any update on issue?..
Hi! We are looking into this issue. Please give us some time. We will get back to you as soon as we resolve this issue.
@suyash ... any update ????...
Hi!
We are unable to reproduce the issue. On our end getRoomWithProperties and joinRoomWithProperties is working fine even when we created a room through dashboard and assigned properties through dashboard.
Thanks
I dont know but its now showing me matching rooms ,,, can i have your email so i can give you more details regarding issue and server details ?..... is it mandatory to pass all properties of that room ?
It's not mandatory to provide all properties. You can email me anytime at support@shephertz.co.in
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
...