View Single Post
02-20-17, 12:46 AM   #25
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by Ketho View Post
Your AceDB is working fine, but you replace the AceDB "global" table reference instead of editing the table
We should have seen it earlier tbh

https://gfycat.com/AcrobaticDefensiveFluke
Code:
@@ -107,15 +107,13 @@ function Experience:UpdateDB()
 	if relativeFrame == UIParent then
 		relativeFrame = "UIParent";
 	end

-	E.db.global = {
-		experience = {
-			["point"] = point,
-			["relativeFrame"] = relativeFrame,
-			["relativePoint"] = relativePoint,
-			["ofsx"] = ofsx,
-			["ofsy"] = ofsy,
-		},
-	}
+	E.db.global.experience = {
+		point = point,
+		relativeFrame = relativeFrame,
+		relativePoint = relativePoint,
+		ofsx = ofsx,
+		ofsy = ofsy,
+	}
 end
Looking at the rest there are a lot of things you could improve on, but I respectfully won't bother you with that
OMG... now I get this!!!

I was so stupid... damn.............................................

You are saying that on :UpdateDB() function I have been re-assigning global table to another brand new experience table reference rather than editing the one that already exists and that caused this issue, right?

That is so true D:...

Thank you so much!!!!

Also, if you don't mind could you please advice me regarding what I could do to improve with my codes, please?
(As you've said)

I am always welcome (not bothered) to learn new things!!!

Let me learn more things !!!

Last edited by Layback_ : 02-20-17 at 01:00 AM.
  Reply With Quote