Hi!I'm trying to set a message listener to the ChallengeStartedMessage listener, but it give me errors.
//Do something
}
The error:
The API docs says that it should be setting like this:
var challenge = message.Challenge;
string messageId = message.MessageId;
bool? notification = message.Notification;
GSEnumerable<GSData> scriptData = message.ScriptData;
string subTitle = message.SubTitle;
string summary = message.Summary;
string title = message.Title;
};
However, that doesn't work either, an throws this error instead:
Hey Michael,
Try restructuring your code to something more like this:
Chances are doing this will give you a more accurate conclusion as to where the error is occurring,
Hope this Helps,
-Tony
I got a different error when using the code that you have posted above :
Cannot implicitly convert type `GameSparks.Core.GSData' to `GameSparks.Core.GSEnumerable<GameSparks.Core.GSData>'
I bypassed this by commenting out "GSEnumerable<GSData> scriptData = message.ScriptData;".
This worked for me.
Michael De Abreu
Hi!
I'm trying to set a message listener to the ChallengeStartedMessage listener, but it give me errors.
//Do something
}
The error:
The API docs says that it should be setting like this:
var challenge = message.Challenge;
string messageId = message.MessageId;
bool? notification = message.Notification;
GSEnumerable<GSData> scriptData = message.ScriptData;
string subTitle = message.SubTitle;
string summary = message.Summary;
string title = message.Title;
};
However, that doesn't work either, an throws this error instead:
Hey Michael,
Try restructuring your code to something more like this:
Chances are doing this will give you a more accurate conclusion as to where the error is occurring,
Hope this Helps,
-Tony
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstDeftouch Design
I got a different error when using the code that you have posted above :
Cannot implicitly convert type `GameSparks.Core.GSData' to `GameSparks.Core.GSEnumerable<GameSparks.Core.GSData>'
I bypassed this by commenting out "GSEnumerable<GSData> scriptData = message.ScriptData;".
This worked for me.
Customer Support
Hey Michael,
Try restructuring your code to something more like this:
Chances are doing this will give you a more accurate conclusion as to where the error is occurring,
Hope this Helps,
-Tony
-
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