question

eparesignups avatar image
eparesignups asked

Azure function examples very out of date. How to access server internal data and current player id.,Azure Functions. Where to get PlayFabId or how to access and write server internal data. Examples out of date.

The github examples show that FunctionContext (which actually doesn't exist anymore and was replaced with FunctionExecutionContext) but the microsoft examples on the site show functionExecutionContext. The github samples who that the context should have currentPlayerId but in the working examples there is no such property. How can I access the currentplayerid in the most up to date way in an azure function?

,

I have been going over the examples in the microsoft docs and it seems lots of information is out of date. The examples indicate that we can somehow get CurrentPlayerId from the context but the variable does not exist in FunctionExecutionContext. Which is another thing, the examples point to a type called FunctionContext which is also not update and does not appear in example code. The examples I've seen for internal data don't show how to get playerId.

sdks
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

·
Seth Du avatar image
Seth Du answered

It is not out-of-date. I am not sure how you implement Azure Function, but if you refer to the PlayFab CloudScript Context, Variables and Server SDKs section of the official documentation, FunctionExecutionContext is something predefined in a helper class, which helps you handle the context. The Helper function is also provided by PlayFab, please see CS2AFHelperClasses.cs.

For now, I will suggest referring the official documentation in the first priority. If you can implement the function successfully, it will be good to learn more about Azure Function via comparing the codes between GitHub repositories and the document.

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.