Login request response is different from the C++ API
Posted: 15 Nov 2013, 09:17
Hi,
I was trying to make a login to a server already working. When I get the response of the server to the LoginRequest I have 2 params "data" and "reason" instead of "data" and "user" that says the C++ API:
http://docs2x.smartfoxserver.com/api-do ... 9ab851b559
Also, there is a problem when I try to access to the "data" content, because I get the game crashed with the following error:
Assertion failed: (px != 0), function operator->, file /Users/ramon/Desktop/boostoniphone-master/framework/boost.framework/Headers/smart_ptr/shared_ptr.hpp, line 424.
The code I use to retrieve the information of the LoginRequest response is this:
boost::shared_ptr<map<string, boost::shared_ptr<void> > > ptrEventParams = ptrEvent->Params();
boost::shared_ptr<void> ptrEventParamValueData = (*ptrEventParams)["data"];
boost::shared_ptr<SFSObject> ptrValue = (boost::static_pointer_cast<SFSObject>)(ptrEventParamValueData);
Thank you very much.
I was trying to make a login to a server already working. When I get the response of the server to the LoginRequest I have 2 params "data" and "reason" instead of "data" and "user" that says the C++ API:
http://docs2x.smartfoxserver.com/api-do ... 9ab851b559
Also, there is a problem when I try to access to the "data" content, because I get the game crashed with the following error:
Assertion failed: (px != 0), function operator->, file /Users/ramon/Desktop/boostoniphone-master/framework/boost.framework/Headers/smart_ptr/shared_ptr.hpp, line 424.
The code I use to retrieve the information of the LoginRequest response is this:
boost::shared_ptr<map<string, boost::shared_ptr<void> > > ptrEventParams = ptrEvent->Params();
boost::shared_ptr<void> ptrEventParamValueData = (*ptrEventParams)["data"];
boost::shared_ptr<SFSObject> ptrValue = (boost::static_pointer_cast<SFSObject>)(ptrEventParamValueData);
Thank you very much.