This content may be freely modified and/or maintained by anyone.

Callmore

Member
Scorekeeper is a script that keeps track of a player's score between re-joins and server restarts by saving it to a file.
If a player does not re-join with in 1 week (by default) their score is removed from the list.
A player's score is tied to their name. If a player where to change their name, their score will be reset to that new name's score.


attachment.php


As well as being a small script for saving peoples scores, it is also a small demonstration of the IO functionality added to SRB2Kart in 1.3, as it saves to and loads from a file to keep track of scores, and syncs the score table using a netvar. As the table is constructed from the file as soon as the script is loaded, it is able to get around the inability to send files to other players.

When being ran on a server, SRB2Kart has to be able to write into the luafiles folder. I have had some people have trouble with this, and the script has been un-able to write the save file.

The file that this script writes to is called scorekeeper.txt. It is only written to on the server.


sk_hoursuntilreset (Default: 168)
How long until a player's score is removed from the list in hours. The default of 168 is equal to 1 week.
attachment.php

Thanks to War-Dog for allowing me to test this script on their server.
 

Attachments

  • KL_Scorekeeper-v1.lua
    3.4 KB · Views: 413
  • scores.png
    scores.png
    23.3 KB · Views: 2,971
  • funnycmd.png
    funnycmd.png
    12.2 KB · Views: 2,111
Last edited:
So I've tried to run this on my server, and had a hard time trying to make the I/O read/write part to work.


After a while, I finally realized that your server needs to run a exe of SRB2Kart 1.3 that has been compiled from the official source, after the 25 september 2020.
More specifically there's a commit to the official repo's code that has been after the release of 1.3, that is necessary to make this work: on github or git.do
 
So I've tried to run this on my server, and had a hard time trying to make the I/O read/write part to work.


After a while, I finally realized that your server needs to run a exe of SRB2Kart 1.3 that has been compiled from the official source, after the 25 september 2020.
More specifically there's a commit to the official repo's code that has been after the release of 1.3, that is necessary to make this work: on github or git.do

Could you help me with this?
 
As part of the team who helps out with the LunarRay/USA server through my work on DaytonaKart, I have to announce an issue about when switching game modes.
 
So I'm having a problem with this. I get the message that the it saves (Saving scores to "scorekeeper.txt"...) and it does but after a couple of games it resets the scores does anyone have a solution to this problem. (This is being used on a hosted server)
 

Attachments

  • Log.PNG
    Log.PNG
    2.3 KB · Views: 195
  • Scorekeeper Properties.PNG
    Scorekeeper Properties.PNG
    14.9 KB · Views: 166
  • Scorekeepr.txt Properties.PNG
    Scorekeepr.txt Properties.PNG
    13.3 KB · Views: 163

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top