Adding properties to a room

0 votes

I am using Marmalade 7.1.2 and trying to create a room with certain properties. I have created a map to use, but I get the error:

Error    4    error C2664: 'void AppWarp::Client::createRoom(_STL::string,_STL::string,int,_STL::map<_Key,_Tp>)' : cannot convert parameter 4 from '_STL::map<_Key,_Tp>' to '_STL::map<_Key,_Tp>'    c:\users\scott\desktop\ctf\ctf\source\data.cpp    109

this is the code I am using..

std::map <string, int> properties;
    properties["level"] = 1;
    warpClient->createRoom(std::string("userCreatedRoom"), std::string("Admin"), 8, properties);


Whats wrong here?

asked Mar 3, 2014 in AppWarp by scott.woolven (35 points)

1 Answer

+1 vote
Best answer

The correct syntax is void createRoom(std::string name,std::string owner,int maxUsers,std::map<std::string,std::string> properties);

Properties is a map of string and string.

std::map <std::string, std::string> properties;
    properties["level"] = "1";
    warpClient->createRoom(std::string("userCreatedRoom"), std::string("Admin"), 8, properties);

answered Mar 4, 2014 by Suyash Mohan (900 points)
selected Mar 4, 2014 by scott.woolven
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