Skip to content

Commit

Permalink
Test for DataStore before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Sep 26, 2022
1 parent b0445a0 commit 430ae04
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Plugins/DataStoreAuctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ function plugin.OnInitialize()
Skillet.db.profile.plugins.DSA.enabled = true
end
Skillet:AddPluginOptions(plugin.options)
for characterName, character in pairs(DataStore:GetCharacters()) do
--DA.DEBUG(0,"OnInitialize: characterName= "..tostring(characterName)..", character= "..tostring(character))
if CharacterName == Skillet.currentPlayer then
Skillet.DSAPlayer = character
if DataStore then
for characterName, character in pairs(DataStore:GetCharacters()) do
--DA.DEBUG(0,"OnInitialize: characterName= "..tostring(characterName)..", character= "..tostring(character))
if CharacterName == Skillet.currentPlayer then
Skillet.DSAPlayer = character
end
end
end
end
Expand Down

0 comments on commit 430ae04

Please sign in to comment.