question

Christopher Bradford avatar image
Christopher Bradford asked

"PlayFab::PlayFabSettings" has no member "titleId" change to the api?,Unable to find PlayFabSettings::titleId during setup

Hello! I am following Link this quick start step for a native cpp project

However then I stick in the code given PlayFabSettings does not have the variable titleId.
I was wondering if there had been some change and if so how do I fix this issue?

,

Hello! I am following Link this quick start step for a native cpp project
However then I stick in the code given PlayFabSettings does not have the variable titleId.
I was wondering if there had been some change and if so how do I fix this issue?

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

·
Citrus Yan avatar image
Citrus Yan answered

Referring to the code in PlayFabSettings.h:

static const std::shared_ptr<PlayFabApiSettings> staticSettings;

https://github.com/PlayFab/XPlatCppSdk/blob/a45af87220dfa0d58637dbadc4f7bd19d11bf436/code/include/playfab/PlayFabSettings.h#L28

And PlayFabApiSettings.h:

std::string titleId; // You mustset this value for PlayFabSdk to work properly (found in the Game Manager for
your title, at the PlayFab Website)

https://github.com/PlayFab/XPlatCppSdk/blob/master/code/include/playfab/PlayFabApiSettings.h#L24

The titleId variable is in class PlayFabApiSettings held by class PlayFabSettings , hence you’ll need to do the following to access it:

PlayFabSettings::staticSettings->titleId = xxx;

About the wrong code in the doc, I’ll report it to the doc team to help fixing it, sorry for the inconvenience.

2 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.

Christopher Bradford avatar image Christopher Bradford commented ·
@Citrus Yan

Thank you!

0 Likes 0 ·
franklinchen avatar image franklinchen commented ·
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.