Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #76 from Rocky28447/data
Browse files Browse the repository at this point in the history
Weird rejoin bug tempfix
  • Loading branch information
Sleitnick authored May 1, 2019
2 parents e7d667b + 1153ffc commit 0125e1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ServerStorage/Aero/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function Data.new(name, scope)
-- Get cached 'data' object if available:
local ds = dataStoreService:GetDataStore(name, scope)
local self = dataPool[ds]
if (self) then return self end
if (self and not self._destroyed) then return self end

-- Create new 'data' object:
self = setmetatable({
Expand Down Expand Up @@ -212,7 +212,7 @@ end

function Data:Increment(key, increment)
assert(not self._destroyed, "Data already destroyed")
local value = self:Get(key, 0)
local success, value = self:Get(key, 0)
assert(type(value) == "number", "Cannot increment a non-number value")
assert(type(increment) == "number", "Increment must be a number")
value = (value + increment)
Expand Down Expand Up @@ -398,4 +398,4 @@ function Data:Init()
end


return Data
return Data

0 comments on commit 0125e1c

Please sign in to comment.