Hello all. New GameSparks user here :) I'm making a game where players can post puzzles for other players to solve. When players start the game, they can either create a new puzzle or browse the list of puzzles posted by others, pick one and start solving it. All puzzles are publicly available and there's no limit on the number of players that can join an existing puzzle.
In order to implement the puzzles system, I'm thinking on leveraging the existing 'Challenges' available in the Multiplayer API. I've started by creating a small Unity test app in order to create a challenge by code and got the following error message:
This is the code I'm using in order to create the challenge (notice that by the time this code gets reached, I've already authenticated using a valid username/password):
var createChallengeRequest = new CreateChallengeRequest();
createChallengeRequest.SetAccessType("PUBLIC").
SetChallengeMessage("Optional challenge message.").
SetChallengeShortCode("ChallengeShortCode01").
SetEndTime(DateTime.MaxValue).
Send((response) =>
{
if (response.HasErrors)
{
Debug.LogError("CreateChallengeRequest has errors.");
}
else
{
Debug.Log("CreateChallengeRequest successful! Instance ID: " + response.ChallengeInstanceId);
}
});
Any ideas on what am I doing wrong? Thanks in advance!
Best Answer
C
Customer Support
said
almost 6 years ago
Hi Ignacio,
Have you set up the challenge details on the portal for "ChallengeShortCode01"?
The shortCode is a challenge "type", not the instance of the challenge to be played. You are creating a challenge of type ChallengeShortCode01. You can set up the details for this in the Multiplayer tab on the portal.
Have you set up the challenge details on the portal for "ChallengeShortCode01"?
The shortCode is a challenge "type", not the instance of the challenge to be played. You are creating a challenge of type ChallengeShortCode01. You can set up the details for this in the Multiplayer tab on the portal.
-Pádraig
1 person likes this
I
Ignacio Liverotti
said
almost 6 years ago
Gotcha, that made the trick! Thank you very much for your swift reply.
Ignacio Liverotti
Hello all. New GameSparks user here :) I'm making a game where players can post puzzles for other players to solve. When players start the game, they can either create a new puzzle or browse the list of puzzles posted by others, pick one and start solving it. All puzzles are publicly available and there's no limit on the number of players that can join an existing puzzle.
In order to implement the puzzles system, I'm thinking on leveraging the existing 'Challenges' available in the Multiplayer API. I've started by creating a small Unity test app in order to create a challenge by code and got the following error message:
This is the code I'm using in order to create the challenge (notice that by the time this code gets reached, I've already authenticated using a valid username/password):
Any ideas on what am I doing wrong? Thanks in advance!
Hi Ignacio,
Have you set up the challenge details on the portal for "ChallengeShortCode01"?
The shortCode is a challenge "type", not the instance of the challenge to be played. You are creating a challenge of type ChallengeShortCode01. You can set up the details for this in the Multiplayer tab on the portal.
-Pádraig
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Ignacio,
Have you set up the challenge details on the portal for "ChallengeShortCode01"?
The shortCode is a challenge "type", not the instance of the challenge to be played. You are creating a challenge of type ChallengeShortCode01. You can set up the details for this in the Multiplayer tab on the portal.
-Pádraig
1 person likes this
Ignacio Liverotti
Gotcha, that made the trick! Thank you very much for your swift reply.
--Ignacio
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics