question

leafsas2015 avatar image
leafsas2015 asked

cloudscript args always null

Hi,

I'm trying to execute a cloudscript but I every parameter I pass to the funcion always returns null;

This is my code on Unity:

PlayFab.PlayFabClientAPI.ExecuteCloudScript( new

PlayFab.ClientModels.ExecuteCloudScriptRequest() { FunctionName = "helloWorld", FunctionParameter = new { a = "aaa" }

}, result => OnExecuteCloudScriptResult(result), OnPlayFabError

and this is the code on the cloud:

handlers.helloWorld = function(args)

{

var inputValue = null;

if (args && args.hasOwnProperty("a"))

inputValue = args.a;

log.debug("Param-a:", { input: inputValue }); // Prints "Param-a:"

}


10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
leafsas2015 avatar image
leafsas2015 answered

Sorry, my mistake,

I've used "," rather that "+" in the log... it works fine :)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.