attempt to concatenate local 'playerName' (a nil value)
1 Attachment(s)
Hey, I need your help.
My addon GildenSteuer sometimes shows the error after porting from a dungeon or using a portal: 1x GildenSteuer\GildenSteuer-3.4.lua:377: attempt to concatenate local 'playerName' (a nil value) That is the line with the error: Lua Code:
Here is the Lines: Lua Code:
I hope anyone can help me. |
Have you checked that the playerName being passed isn't nil for some reason before calling the function ?
I see you are setting up PlayerName at the OnEnteringWorld event but, is it possible some of the functions accessing it are being called in before then ? What I would do in your situation Do a debug run on each function that uses PlayerName and see what order they run through and if there is a time where PlayerName is nil when used. If there is, and its a valid reason for it to be nil you can just check for not nil before continuing that function. |
Either I'm stupid or I don't know. I can't find the error.
|
Well GetGuildRosterInfo (and other API that rely on a roundtrip to server for information) don't always provide valid data early in the loading process.
You can either monitor GUILD_ROSTER_UPDATE or check that name is not _G.UNKNOWNOBJECT and level return is valid before trying to use the returns. This is all assuming the addon doesn't try to call GetGuildRosterInfo on an unguilded character. |
All times are GMT -6. The time now is 03:43 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI