question

MoonHeonYoung avatar image
MoonHeonYoung asked

sample project help

Hello The answer to the previous question is well received.

The problem was resolved by putting my game title id in the title id.

But there was another problem. When I posted a value like the screenshot, The results are not reflected in the Play Fab Portal. (0 value that is not updated)

If you press the arrow button on the game screen, an error occurs in the console window.

Why is this happening?

And like the yellow letters on the game screen,No results are displayed.

I just linked the entryprefab to the object.

dzfdsfsdfs.png (235.8 KiB)
werwerwerw.png (51.3 KiB)
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

·
Hernando avatar image
Hernando answered

The document seems to have some issues, it loses a part of the tutorial about the initial setup of the rules. In addition to that, you also need to add two additional rules([Automation]->[Rules]), that can react to a subset of one type of PlayStream Events in real time. You can build it refer to the pictures below and replace the TitleID value with your title ID.

For the error you get, you can comment this code "ShowLeaderboard(CurrentLeaderboard);" in SampleManager.cs, the modified code you can refer to below.

	public void NextLeaderboard()
	{
		CurrentLeaderboard++;


		if (CurrentLeaderboard == LeaderboardInfo.GetLength(0))
		{
			CurrentLeaderboard = 0;
		}


		RefreshLeaderboards();


		//ShowLeaderboard(CurrentLeaderboard);
	}

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.

MoonHeonYoung avatar image MoonHeonYoung commented ·

really thanks!!!!!! all error has disappear : )

Is the error caused by commented showlearderboard?

I have not studied the function called rules yet. What does this function simply do?

have nice day!

0 Likes 0 ·
Hernando avatar image Hernando MoonHeonYoung commented ·

    The line of code “ShowLeaderboard(CurrentLeaderboard) ”in SimpleManager.cs is executed twice when switching LeaderBoards in different places, where the call in the callback --in function GoToLeaderboards -- is correct, but the call in function NextLeaderboard will use the data before the data is returned. This is the cause of the error occurs.

    And rules for triggering actions based on matching events are defined using the visual rule editor in the Game Manager. You can get more information about it from this: https://api.playfab.com/docs/tutorials/landing-automation/playstream-rules

    0 Likes 0 ·
    Kerem Baydogan avatar image Kerem Baydogan commented ·

    This sample is full of bugs and documentation is incomplete. There are several fixes recommended in the forums but no one from PlayFab updated the GitHub repo with that fixes. What are you waiting for PlayFab?

    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.