I am trying to make a basic scheduler, that I need to call from ChallengeEvent
This is how I use it:
var playMoveTimeJson = Spark.getProperties().getProperty("PLAY_MOVE_TIME");
var playMoveTime = playMoveTimeJson.time;
var currentPlayerId = messageToSend["currentPlayerId"];
var kickPlayerData = {
"currentChallenge" : currentChallenge,
"kickPlayer" : currentPlayerId
};
var sparkScheduler = Spark.getScheduler();
sparkScheduler.inSeconds("KickPlayer", playMoveTime, kickPlayerData, "kick_player_data");
And this is the response I get from the server.
{"@class":".GameSparksErrorResponse","error":{"message":"Can't find a codec for class com.gamesparks.scripting.impl.SparkChallengeImpl. (challengeEvent/SendPlayerMove.js#46)"},"message":"Can't find a codec for class com.gamesparks.scripting.impl.SparkChallengeImpl. (challengeEvent/SendPlayerMove.js#46)","requestId":"636567384847030000_2"}
What am I doing wrong here?
1 Comment
N
Narek Aghekyan
said
almost 5 years ago
Sorry for calling false alarms. This issue was showing up when I was trying to read currentChallengevariable.
Narek Aghekyan
Hello.
I am trying to make a basic scheduler, that I need to call from ChallengeEvent
This is how I use it:
And this is the response I get from the server.
What am I doing wrong here?