Those look like Base 64 encoded strings. Are you calling the REST api calls directly or using the corona-cloud-core.lua file? The Lua file’s wrapper calls will Base 64 encode your data (to keep it web-safe) and it should decode it for you when the RecentMoves Multiplayer event is dispatched.
The mime module (mime = require(“mime”) ) has a Base 64 decode function. The corona-cloud-core.lua file has a b64 decode function in it as well but it’s not exposed so you would need to probably copy it to your local code.
The 404 error has been resolved by changing the HTTP method to DELETE.
However now I get the following response for both of the functions accept/decline:
status: 500;
We’re sorry, but something went wrong (500)
Not sure where this is coming from.
I now use the following configuration:
- acceptChallenge(matchID, “lets play”) HTTP method POST
- declineChallenge(matchID) HTTP method DELETE
I am quite sure that my matchID is legal, while I first call getMatches() to get the matchID for the match that has a user with the state pending. Then I log in with this user and call either accept/declineChallenge(matchID) which both give me the 500 error.
Hope I have provided you with enough information to tackle the error
I’m not getting the 500 error, but I’m getting a different issue. I’ve email the folks on the cloud team to look into this further. In my case though, the decline seemed to take effect when I got my next match list.
It is a pity really but I still get the 500 error.
I have started a new game with a new invite so everything fresh, but it’s still not working.
Is it a problem if the game has already been started? When I create the game I always instantly set its state to started, don’t know if that might be a problem.
Those look like Base 64 encoded strings. Are you calling the REST api calls directly or using the corona-cloud-core.lua file? The Lua file’s wrapper calls will Base 64 encode your data (to keep it web-safe) and it should decode it for you when the RecentMoves Multiplayer event is dispatched.
The mime module (mime = require(“mime”) ) has a Base 64 decode function. The corona-cloud-core.lua file has a b64 decode function in it as well but it’s not exposed so you would need to probably copy it to your local code.