From 1d5960a13c3be933510b69e2d28d1b1b357601f4 Mon Sep 17 00:00:00 2001 From: Stephen Leitnick Date: Sun, 19 May 2019 18:31:38 -0400 Subject: [PATCH] Style changes --- src/ServerStorage/Aero/Modules/Data.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/ServerStorage/Aero/Modules/Data.lua b/src/ServerStorage/Aero/Modules/Data.lua index 73a84c9..0eea61b 100644 --- a/src/ServerStorage/Aero/Modules/Data.lua +++ b/src/ServerStorage/Aero/Modules/Data.lua @@ -495,25 +495,22 @@ function Data:Start() local function FireBoundToCloseCallbacks() local numBinded = #self._onCloseHandlers if (numBinded == 0) then return end - local Bindable = Instance.new("BindableEvent") + local bindable = Instance.new("BindableEvent") local numCompleted = 0 - for _,func in pairs(self._onCloseHandlers) do spawn(function() local success, err = pcall(func) if (not success) then - warn("BindToClose function errored: " .. tostring(err)) + warn("Data BindToClose function failed: " .. tostring(err)) end - numCompleted = (numCompleted + 1) if (numCompleted == numBinded) then - Bindable:Fire() + bindable:Fire() end end) end - - Bindable.Event:Wait() - Bindable:Destroy() + bindable.Event:Wait() + bindable:Destroy() end local function AutoSaveAllData()