I want to call another cloud script function in the cloud script. How to do that?
Something like:
handler.function1 = function (args)
{
function2();
}
handler.function2 = function (args)
{
log.debug("hello world");
}
I want to call another cloud script function in the cloud script. How to do that?
Something like:
handler.function1 = function (args)
{
function2();
}
handler.function2 = function (args)
{
log.debug("hello world");
}
You would do this by creating a function. So, based on your example, it would be:
handler.function1 = function (args)
{
function2();
}
function function2(args)
{
log.debug("hello world");
}
Have a look at the processPlayerMove function in the basic Cloud Script sample, for an example of this (installed as revision 1 in all new titles, but it's also available in GitHub, here: https://github.com/PlayFab/CloudScriptSamples/blob/master/BasicSample/basic_sample.js).
No one has followed this question yet.