I mean seriously, yesterday I’ve sepnt MY WHOLE DAY trying to solve stupid little bugs and errors in the Verse codes a lot of AIs gave me, now i am using THE LITERRAL EPIC’S CODES FROM THEIR SITE!!! and still it gives me not less then 7 errors !!!
I mean why epic made this whole guide with examples, and in the end just copy-pasta codes for people to use, and THE VERSE STILL GIVES ERRORS???
What can i do now???
I took some codes from here, did exactly what needed, and still:
I will admit it’s slightly confusing because they have using { PlayerStatistics } using { PlayerLeaderboard } in the final script which they didn’t show how to access, but it seems like you can just reference the player_leaderboards and player_stats_manager to access the unknown identifiers you’re getting. You’ll then have to change the code to things like PlayerStats(or whatever you name the reference).InitializeAllPlayerStats()
However, at the top of the article:
Persistence is one of the most advanced Verse topics, I would recommend not just copying and pasting code relating to it because not knowing what you are doing can create persistence errors down the line that will prevent you from publishing new updates. It’s something to make sure you understand completely before writing code using, these tutorials are just stepping stones.
So what can i do? i thought those codes they are sharing as “complete code” is enough to get the device the guide talked about just done. How can i try and practice it if it is not working?
Any idea on how to fix it?
I recommend going through the previous tutorial (Persistent Player Statistics) and then the leaderboard tutorial. This means not copy and pasting but reading through all the code and explanations to make sure you understand every line of code by the end. This is because if you have a line of code that you copied and don’t know what it does, 90% of the time it will come back to bite you, and as the case is with persistence, maybe stop you from being able to publish updates. If these tutorials are too difficult start with easier topics and work your way up (warforge and Graeme bull have great tutorials on youtube).
For base functionality, like I said above all you need is the other two scripts player_leaderboards and player_stats_manager (above where you copied the original script) to use all the functions you’re currently getting as undefined.