CreateJoinButton defined too late
Stanzilla opened this issue · 3 comments
In line https://github.com/TheBackstabi/WorldQuestParty/blob/master/WorldQuestParty.lua#L81 you call CreateJoinButton
which will not exist since you only create it on line 261 https://github.com/TheBackstabi/WorldQuestParty/blob/master/WorldQuestParty.lua#L261
This should be a non-issue. The CHAT_MSG_ADDON event doesn't fire until the player is fully logged in, at which point the CreateJoinButton function is defined.
1x WorldQuestParty\WorldQuestParty-BFA-1.4.lua:81: attempt to call global 'CreateJoinButton' (a nil value)
WorldQuestParty\WorldQuestParty-BFA-1.4.lua:81: in function <WorldQuestParty\WorldQuestParty.lua:68>
(tail call): ?
Locals:
self = WorldQuestPartyFrame {
0 = <userdata>
EnterWQ = <function> defined @WorldQuestParty\WorldQuestParty.lua:430
SetAsParty = <function> defined @WorldQuestParty\WorldQuestParty.lua:388
JoinFrame = WQPJoinFrame {
}
HeaderFrame = WQPHeaderFrame {
}
ExitWQ = <function> defined @WorldQuestParty\WorldQuestParty.lua:465
DebugPrint = <function> defined @WorldQuestParty\WorldQuestParty.lua:14
SetAsIndividual = <function> defined @WorldQuestParty\WorldQuestParty.lua:407
CreateSubFrames = <function> defined @WorldQuestParty\WorldQuestParty_Frames.lua:162
HookEvents = <function> defined @WorldQuestParty\WorldQuestParty.lua:264
}
self = "CHAT_MSG_ADDON"
prefix = "WQPartyFinder"
msg = "<"
channel = "CHANNEL"
sender = "Alissary-ZirkeldesCenarius"
senderNoRealm = "1. WQP51017PVP"
(*temporary) = nil
(*temporary) = "attempt to call global 'CreateJoinButton' (a nil value)"
DEBUG = false
isRegistered = false
AddonMessageChannel = "WQPartyFinder"
parties = <table> {
Alissary-ZirkeldesCenarius = false
}
joinButtonTimer = <table> {
_callback = <function> defined @SharedXML\C_TimerAugment.lua:14
_remainingIterations = 1
Countdown = <table> {
}
_cancelled = true
}
CancelTimer = <function> defined @WorldQuestParty\WorldQuestParty.lua:45
GetUnitGroupIndex = <function> defined @WorldQuestParty\WorldQuestParty.lua:50
_L = <table> {
FULL = "Party Full"
COMPLETE = "I’ve completed the %s WQ. Thanks for your help! (World Quest Party)"
LISTED = "Party Listed"
YES = "Yes"
JOIN = "Join Party"
LFM = "LFM %s WQ - whisper me "wq" for an invite! (World Quest Party)"
RESET = "WQP: All set, addon has been reset!"
NO_PARTIES = "No parties found yet…"
SEARCHING = "Searching..."
PROMPT = "Leave party?"
ENLIST = "Enlist Party"
NO = "No"
SLASH = "If you run into any issues, please reach out for support!
WQP Commands:
reset - clear and reset addon data."
NEW = "Create Party"
JOINING = "Requesting Invite…"
WAITING = "Waiting for party status..."
POST = "Post LFM"
UNLISTED = "Party Delisted"
DELIST = "Delist Party"
LEAVE = "Leave Party"
}