[Solved] [Persitent] Keeping player data across ALL servers

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

User avatar
Dommy
Translator
Translator
Posts: 1866
Joined: 25 Aug 2011, 21:45
Location: Poland
Contact:

Re: [Solved] [Persitent] Keeping player data across ALL serv

Post by Dommy »

Declaring a persistent variable for Page or LocalUser will save the value until title pack where its used is uninstalled or profile GBX file is deleted.

Don't use persistent to share statistics across servers directly in mode script, it will save value to server profile on its file system only. Use manialink instead - manialinks are executed on client side, which allows you to store persistent on user side.

Pro tip - in single player both server host and manialink user are using the same profile, so persistent values can be used instead netwrite/netread to share variable between solo mode script and manialink instantly.


Offtop:
@olivierde8: In your script I saw setting variable value with class:

Code: Select all

declare Boolean[Text] UserSettings = Boolean[Text];
Is it working? I wasn't able to check this ^^.
Ryzen 7 2700X, GTX 1070 Ti, 16 GB RAM, Windows 10 Insider Build
FORUM MODERATOR • CREATOR OF SHOOTMANIA GALAXY & TRACKMANIA² PURSUIT

Contact me via GALAXY & PURSUIT DISCORD
User avatar
Darkminus
Posts: 228
Joined: 05 Jun 2012, 20:54
Location: Dans mon monde.
Contact:

Re: [Solved] [Persitent] Keeping player data across ALL serv

Post by Darkminus »

I just use persistent variables for clients, declared in Manialink.

The goal of these variables is just to store final stats to get them when the player comes back or go to another server.

When the script is running, I use Net variables (which are copy of persistent) declared for player to read/write stats in Script.

Then I copy them to client's persistent variable to store it. It seems to work as expected ^^

:thx:
Professor Law
ShootMania-addict since June 2012.
Arena Duel, Duel Elite V2, MidAir V2 and SDPro Developer

System Specs:
OS: Windows 10 Professionnal x64
CPU: Intel i5-4670
GPU: MSI TwinFrozr GTX 760 OC
Motherboard: Asus Z87-C
RAM : 10Gb
oliverde8
Posts: 1286
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Solved] [Persitent] Keeping player data across ALL serv

Post by oliverde8 »

domino54 wrote:Offtop:
@olivierde8: In your script I saw setting variable value with class:

Code: Select all

declare Boolean[Text] UserSettings = Boolean[Text];
Is it working? I wasn't able to check this ^^.
I am pretty sure it does :D that code has been running on servers for over a year now.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest