Skip to content

Commit

Permalink
Fix get_player_data sometimes using non-int index
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharparam committed Nov 5, 2024
1 parent 03b5d48 commit 5d21ea4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/cc_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function cc_util.get_player_data(player_index)
if not player or not player.valid then
return nil
end
player_index = player.index
if not storage.player_data then storage.player_data = {} end
if not storage.player_data[player_index] then
storage.player_data[player_index] = {}
Expand Down

0 comments on commit 5d21ea4

Please sign in to comment.