View Bug Report
Error on first load of new character
Bug #: 5247
File: FuBar - MoneyFu
Date: 12-07-08 11:19 AM
By: Csalago
Status: Unconfirmed
Just switched over to Fortress from Titan, so MoneyFu is the closest thing to the GoldTracker. Now that I have it all configured and working, when I first login with a new character I get the following message:

"FuBar_MoneyFu-v1.2\\MoneyFu.lua:335: attempt to perform arithmetic on field '?' (a nil value)\nAceAddon-2.0-91091 (Fence):983: in function <...face\\AddOns\\Fence\\libs\\AceAddon-2.0\\AceAddon-2.0.lua:976>\n<in C code>: ?\nAceEvent-2.0-91091 (Fence):260: in function `TriggerEvent'\nAceEvent-2.0-91091 (Fence):910: in function <...face\\AddOns\\Fence\\libs\\AceEvent-2.0\\AceEvent-2.0.lua:903>\n\n ---",

the next time I login with that character, I do not get the error.

Fence & MoneyFu have the same versions of Ace2 libs, so I don't even know where to start looking.

RSS 2.0 Feed for Bug CommentsNotes Sort Options
By: Csalago - 12-08-08 06:51 AM
okay, this happened again this morning. So it appears it's going to do this error the first time I login each day.
By: Csalago - 12-08-08 07:48 AM
just did a bunch of testing by adding some debug print messages in. It seems the problem lies with this statement, self.db.char.time[today], the first time you login for the day on that char. maybe the variable hasn't been created in the DB for today yet, so it's returning a nil value the first time?
By: Csalago - 12-08-08 07:55 AM
temporarily solved the problem by adding:

if not self.db.char.time[today] then
self.db.char.time[today] = 0
end
By: Csalago - 12-09-08 07:07 PM
actually had to add this as well right below the previous lines:

if not self.db.realm.time[today] then
self.db.realm.time[today] = 0
end
By: Kuzo - 10-27-09 02:03 PM
Has this fix been implemented in the latest version of MoneyFu? I switched over to using LDB, and I've been using Fubar2Broker so I could keep using MoneyFu. Unfortunately, this problem cropped up when I did so.