How can I make this report system more efficient?

I don’t know exactly where to put this, apologies if it is in the wrong category. Please let me know and I can move it.

Hey!

I’ve been working on a player reporting system, but I’m not sure if the way I’m logging the reports is efficient.
I don’t want to reveal the exact code so it doesn’t get stolen or exploited, but this is essentially how it works:

PlayerA wants to report someone. They provide the player to report, the type of report (e.g. exploits, scam, etc.), and the reason for the report.

The server then gets the time issued, both PlayerA’s and PlayerB’s UserIds, the type of report, and the provided reason. It saves this data into 3 locations the Player datastore in both PlayerA’s and PlayerB’s keys, as well as the game’s internal datastore.

I don’t think having it saved into 3 different locations like this is efficient. I would appreciate any advice on a better storage system.

Thanks in advance.

1 Like

Just save it to a datastore, you only need 1 datastore if using pcalls correctly. It could be worth saving other data as well such as chatlogs/playerpositions depending on the type of report.

1 Like

Is it necessary to save it in the player data? As you suggest, it’s a bit redundant…

I would only save it in a separate datastore that isn’t really related to the player’s data.

If you absolutely want the data to be accessibly from the player’s data, you should use a shared unique id per report. That key is saved to the player data, and the actual report is only saved once to the central datastore.

Same principle as a relational database.

But off course first of all you should think about wether this is actually causing issues or not. Datastores have a pretty high capacity, but depending on the frequency of reports (or exploiters!) it might not be enough.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.