Sign In Register

How can we help you today?

Start a new topic
Solved

scriptData does not persist between Request and Response cloud code

According to thisĀ the docs, one should be able to use setScriptData in the Request handler and retrieve that with getScriptData in the Response handler. I'm finding that I only get null in the Response handler. Specifically, I'm looking at DeviceAuthenticationRequest and AuthenticationResponse.


We're about to begin a major overhaul to our documentation Nick.
I've added a note about what you mentioned re the scriptdata specifically.


Thanks,


Oisin.

Okay, I figured it out. You set it in the request with setUserData(key, value) and get it with getData().key. https://support.gamesparks.net/support/discussions/topics/1000055250


VERY confusing and underdocumented.

Tested with ListAchievements*. Both scripts get triggered at least, but still experiencing the same behaviour: getScriptData returns null.

I tried to test with a fresh Request+Response pair: AccountDetailsRequest. Appears that AccountDetailsResponse is called, but AccountDetailsRequest is never triggered (in the Test Harness with Debug Requests checked, it doesn't debug).

Login to post a comment