question

Steve [not provided] avatar image
Steve [not provided] asked

'currentPlayerId is not defined' error on automated cloudscript task

This is a little tricky for me to solve as it doesn't happen 100% of the time... but sometimes when an automated cloudscript task runs it fails and gives the error:

"StackTrace": "ReferenceError: currentPlayerId is not defined\n

If I run the cloudscript function exclusively on one user it works 100% time, the error only happens when setup as an automated task and, again, it doesn't occur on every run.

What's the best way to trouble shoot this?

Thanks,

Steve

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

·
brendan avatar image
brendan answered

Can you give us the Title ID, the specific handler you're calling in Cloud Script, and the ID of the Scheduled Task you've set up?

3 comments
10 |1200

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

Steve [not provided] avatar image Steve [not provided] commented ·

Title is "EFD"

The cloudscript handler is "AssignCardStoreItems"

The Task is "Assign Card - 6 Hours"

Thanks

0 Likes 0 ·
brendan avatar image brendan Steve [not provided] commented ·

That task is set to "Run Cloud Script function once", which means you're not running it on a player. That's the setting you'd use to update Title Data, to turn on or off a holiday event, for example. You'll need to switch it to run against a Segment, so that you can run it on all players in a given Segment.

0 Likes 0 ·
Steve [not provided] avatar image Steve [not provided] commented ·

Ah, right! Thanks so much :)

0 Likes 0 ·

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.