Mercurial > wow > cyborg-mmo7
comparison CyborgMMO7.lua @ 37:0734b90e605a
Create the saved data root table when it doesn't exist.
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Thu, 25 Apr 2013 18:15:52 +0000 |
parents | 8fc4f8a25225 |
children | 67ad1101ee10 |
comparison
equal
deleted
inserted
replaced
36:8fc4f8a25225 | 37:0734b90e605a |
---|---|
188 end | 188 end |
189 | 189 |
190 function CyborgMMO_Event(self, event, ...) | 190 function CyborgMMO_Event(self, event, ...) |
191 if event == "VARIABLES_LOADED" then | 191 if event == "VARIABLES_LOADED" then |
192 VarsLoaded = true | 192 VarsLoaded = true |
193 -- create root table if necessary | |
194 if not CyborgMMO7SaveData then | |
195 CyborgMMO7SaveData = {} | |
196 end | |
193 -- convert old profile | 197 -- convert old profile |
194 if CyborgMMO7SaveData[SaveName] and not CyborgMMO7SaveData.Settings then | 198 if CyborgMMO7SaveData[SaveName] and not CyborgMMO7SaveData.Settings then |
195 local oldData = CyborgMMO7SaveData[SaveName] | 199 local oldData = CyborgMMO7SaveData[SaveName] |
196 CyborgMMO7SaveData = {} | 200 CyborgMMO7SaveData = {} |
197 CyborgMMO7SaveData.Settings = oldData.Settings | 201 CyborgMMO7SaveData.Settings = oldData.Settings |