diff 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
line wrap: on
line diff
--- a/CyborgMMO7.lua	Thu Apr 25 18:15:46 2013 +0000
+++ b/CyborgMMO7.lua	Thu Apr 25 18:15:52 2013 +0000
@@ -190,6 +190,10 @@
 function CyborgMMO_Event(self, event, ...)
 	if event == "VARIABLES_LOADED" then
 		VarsLoaded = true
+		-- create root table if necessary
+		if not CyborgMMO7SaveData then
+			CyborgMMO7SaveData = {}
+		end
 		-- convert old profile
 		if CyborgMMO7SaveData[SaveName] and not CyborgMMO7SaveData.Settings then
 			local oldData = CyborgMMO7SaveData[SaveName]