I don't see a boolean here that would be run except in online. What line is the debugger complaining about ? Step through it.
I solved changing:
var state = Spark.getData().scriptData[online];
to
Spark.setScriptData("isonline", online)
I can now do a GetBoolean("isonline") and check its status in unity and the result is simply TRUE or FALSE.
Is this the right approach?
Yes, that is correct.
Matteo Grossi
Hello,
when populating a leaderboard with a GetLeaderboardDataRequest, i also check if the opponents in the leaderboard are online.
To do so i created an event which contain the following custom code:
but i get the following response error message:
cannot read property "false" of undefined
False(or True) is the correct value i am expecting but i am not sure how to pass it as a bool value and then have a response without errors.
Thanks,
Matteo