Closed cremor closed 2 years ago
I got this too so hopefully it's common enough to debug quickly. No idea how you got the extra debug info but the rest of mine is the same.
[string "=[C]"]: in function `format'
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:70: in function <ChocolateBar\modules\CB_PlayedTime.lua:65>
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:78: in function <ChocolateBar\modules\CB_PlayedTime.lua:77>
Locals:
(*temporary) = "%s-%s"
(*temporary) = nil
(*temporary) = nil
(*temporary) = "string expected, got nil"
@Kiatra This is not fixed in v3.8.1!
2x ChocolateBar\modules\CB_PlayedTime.lua:70: bad argument #2 to 'format' (string expected, got nil)
[string "=[C]"]: in function `format'
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:70: in function <ChocolateBar\modules\CB_PlayedTime.lua:65>
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:78: in function <ChocolateBar\modules\CB_PlayedTime.lua:77>
Locals:
(*temporary) = "%s-%s"
(*temporary) = nil
(*temporary) = "Blackmoore"
(*temporary) = "string expected, got nil"
ah yes apparently, this error pups up only first login...
Fixed with 3.8.2
@Kiatra Sorry, but this is still not fixed in v3.8.2:
1x ChocolateBar\modules\CB_PlayedTime.lua:66: bad argument #2 to 'format' (string expected, got nil)
[string "=[C]"]: in function `format'
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:66: in function <ChocolateBar\modules\CB_PlayedTime.lua:60>
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:74: in function <ChocolateBar\modules\CB_PlayedTime.lua:73>
Locals:
(*temporary) = "%s-%s"
(*temporary) = nil
(*temporary) = "Blackmoore"
(*temporary) = "string expected, got nil"
You changed the function onEnteringWorld
, but the error actually comes from the call in the function playedTimeEvent
.
I'm getting the same error, I've gone back to the pull request icbat made.
@cremor, in 3.8.2 The function onEnteringWorld got a 2 second timer delay on the call for RequestTimePlayed() this triggers the playedTimeEvent. That fixed it for me.
I tried a different API in UnitFullName("player") for the getting the char name and realm, that seems more stable in the latest commit 166711367400b76c7dc067e03b34384606bcd884 can you tray that one out before I release it?
Sorry for not replying earlier, but I couldn't test until now. I just tested 3.8.3 and it seems to fix the problem, thanks!
@Kiatra Bad news. While the error on login seems to be fixed, I just got a new - but similar - error when using my hearthstone. This time it's the realm name that is nil.
1x ChocolateBar\modules\CB_PlayedTime.lua:62: bad argument #3 to 'format' (string expected, got nil)
[string "=[C]"]: in function `format'
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:62: in function <ChocolateBar\modules\CB_PlayedTime.lua:60>
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:86: in function <ChocolateBar\modules\CB_PlayedTime.lua:85>
[string "@ChocolateBar\modules\CB_PlayedTime.lua"]:98: in function `func'
[string "@BagSync\libs\AceTimer-3.0\AceTimer-3.0-17.lua"]:57: in function <...ceBagSync\libs\AceTimer-3.0\AceTimer-3.0.lua:50>
Locals:
(*temporary) = "%s-%s"
(*temporary) = "Cremor"
(*temporary) = nil
(*temporary) = "string expected, got nil"
Seems like this is now completely fixed in v3.8.4, thanks!
Since path 9.2 I always get this Lua error on the first login with a just started client. Later relogs or UI reloads do not trigger the error.
Using ChocolateBar v3.8
A few debug infos:
Since those values all look ok, and later relogs or UI reloads do not trigger the error, I assume it is just a timing error. The values are not yet available when the code is first executed.