Skip to content

Commit 54f6106

Browse files
author
Paul Gilmore
authored
Update TypeScriptGettingStarted.md
1 parent f9d6dc5 commit 54f6106

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TypeScriptGettingStarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ The other important HTML lines:
129129
As you can see above, app.js contains the DoExampleLoginWithCustomID function. These lines bind our js file to our webpage, and invoke the DoExampleLoginWithCustomID function in that script. Everything else is just GUI. The name "app.js" is based on the typescript file in our default project "app.ts". If you rename "app.ts", it will generate a ".js" file with the same name. You should not try to add ".ts" scripts directly to a webpage. For more information about TypeScript, read the [TypeScript tutorial](https://www.typescriptlang.org/docs/tutorial.html).
130130

131131
* Line by line breakdown for app.js
132-
* PlayFab.settings.titleId = (>HTMLInputElement>document.getElementById("titleId")).value;
132+
* PlayFab.settings.titleId = (<HTMLInputElement>document.getElementById("titleId")).value;
133133
* This reads the titleId from the html-input, and sets it to the PlayFab sdk. TypeScript defines that getElementById returns type HTMLElement. We must cast that to the sub-type HTMLInputElement to get the input-specific field "value".
134134
* Every PlayFab developer creates a title in Game Manager. When you publish your game, you must code that titleId into your game. This lets the client know how to access the correct data within PlayFab. For most users, just consider it a mandatory step that makes PlayFab work.
135135
* var loginRequest: PlayFabClientModels.LoginWithCustomIDRequest = { TitleId: PlayFab.settings.titleId, CustomId: "GettingStartedGuide", CreateAccount: true };

0 commit comments

Comments
 (0)