From 64b63f691aa945271ba1ba0bb829cd4dbb7dc056 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Thu, 18 Aug 2022 21:09:13 +0200 Subject: [PATCH] Session handler - fix minor issue --- utils/datastore/session_data.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/datastore/session_data.lua b/utils/datastore/session_data.lua index 058cde766..74cdf54b5 100644 --- a/utils/datastore/session_data.lua +++ b/utils/datastore/session_data.lua @@ -386,12 +386,12 @@ Server.on_data_set_changed( function(data) local player = game.get_player(data.key) if player and player.valid then - session[data.player_index] = data.value + session[data.key] = data.value if data.value > settings.trusted_value then - trusted[data.player_index] = true + trusted[data.key] = true else - if trusted[data.player_index] then - trusted[data.player_index] = false + if trusted[data.key] then + trusted[data.key] = false end end end