[Urgent] AS3 SDK: 'createRoom' and 'getRoomsWithProperties' match making.

0 votes


Having trouble with 2 method: 'createRoom' and 'getRoomsWithProperties'

Steps to reproduce:

1/ Create a room with property: type = ''random"

WarpClient.getInstance().createRoom("John Doe", "johndoe", 5, {type:"random"});


2/ Then try to get the room created with property: type = "ramdom"


3/ But receive callback with no room.

public function onGetMatchedRoomsDone(event:MatchedRooms):void
            trace("onGetMatchedRoomsDone "+event.rooms);

4/ Then trying the same getRoomsWithProperties method but the input param is Dictionary instead of Object data type, the callback return ALL rooms(!?), included all my static rooms created before.


There are examples with this feature but no AS3 written.

I think there is trouble with tableProperties of room objects.

Because of this problem, I'm stuck now.


asked Sep 25, 2014 in AppWarp by Mai Khánh (12 points)

2 Answers

–1 vote
You should use 'Object' data type for creating JSON objects. For example :
var json:Object = new Object;
json.type = "random";
WarpClient.getInstance().createRoom("John Doe", "johndoe", 5, json);
answered Sep 25, 2014 by Suyash Mohan (900 points)
Hi, thank you for fast response.

I tried that way before. But still had no luck. It just does NOT work.

Could you make an example for this scenario? It's best for others get stuck like me and make sure that everything works fine.
We will test it out and let you know here on this thread.
Hi there,

How're things going?
Hi Suyash, I still waiting for your response. Are you still working on this issue?
Can you share your project with us? Atleast share some code snippets that we can try to run on our side. My email is suyash.mohan@shephertz.co.in
0 votes
For who's getting the same issue,

My temporarily way to avoid this issue is to use "updateRoomProperties" method after creating the room. and everything's good.

But that's a bad way. It takes 2 requests.

So please take a look at my report seriously!
answered Oct 13, 2014 by Mai Khánh (12 points)

Please try our latest SDK and let us know if you are still facing the issue or not. Here is the link to our Github Repo https://github.com/shephertz/AppWarpAS3Library/tree/master/V_1.10

The download link for SDK on  website will be updated soon, till then use our github repo to download the latest version.

Whenever you are dealing with properties use 'Object' data type. For E.g. :

var prop:Object = new Object;
prop.country = "India";

Thanks for your work. I've not tested yet because I am confused. As I know the latest verion is 1.6.3, but currently I'm using 1.6.2 because of another bug with 1.6.3 version (!!)

Why don't you update 1.6.3 version instead of using the very begining 1.1.10 version?

It will be best if you could update 1.6.2 version. Thank you.
There were internal releases after 1.6.3. Version 1.10 is the latest release that has new features for turn based games. This bug has been resolved in this release.

What else bugs were you facing with the 1.6.3 version?
Hi, there's a problem with appwarp listener when I use the latest as3 sdk 1.10:

public function onConnectDone(event:int) is not compatible any more, this issue also happens with version 1.6.3

I have to continue using 1.6.2 version. Please double check this issue.
One more issue:
- 1.10 version requires onPrivateUpdateReceived method to be implemented but I don't know how to make it compatible, please note for me how to impletement this also.

Thank you.
These are not issues. As I told you earlier, the new version contains a lot of changes. You will need to update your game by implementing these missing listeners in your game.
Hi, I appreciate your work, and that my bad for call them issues..

But these new changes are not documented yet. So how can I can implement them in my listeners? At least, can you show me how to implement them?

I'm getting problem when implement onConnectDone and onPrivateUpdateReceived methods.
This is an upcoming version. We are updating our documentation and samples. Please use this sample as reference to learn how to implement the missing listeners https://github.com/shephertz/AppWarpAS3Library/tree/master/SpriteMoveDemo

The onConnectDone now provides additional parameter which tells what could be the reason for auth error if there is any auth error. Similarly we have added feature to send binary messages privately to a user. Hence onPrivateUpdateReceived is also added. Similarly we have added mechanism to set custom turn based logic resulting in addition of new listeners.
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