Journalator

Journalator

145k Downloads

Lua error when training a low-level toon

b-morgan opened this issue ยท 1 comments

commented

Please include as much of the following information as possible to help me fix the bug:

Brief Description of Bug

Lua error when training a low-level toon.

Steps to Reproduce

Start a new character and level until you can train. Open the trainer and click Train one more time than the number of spells you can train. The lua error occurs when you click Train with nothing to learn.

Loaded Addons

If you need it, ask.

Back Trace (LUA Error Output)

1x Journalator/Source/Monitor/TrainingCosts.lua:88: attempt to index local 'details' (a nil value)
[string "@Journalator/Source/Monitor/TrainingCosts.lua"]:88: in function QueuePurchaseAttempt' [string "@Journalator/Source/Monitor/TrainingCosts.lua"]:21: in function <Journalator/Source/Monitor/TrainingCosts.lua:17> [string "=[C]"]: in function BuyTrainerService'
[string "@Blizzard_TrainerUI/Blizzard_TrainerUI.lua"]:458: in function `ClassTrainerTrainButton_OnClick'
[string "*Blizzard_TrainerUI.xml:494_OnClick"]:1: in function <[string "*Blizzard_TrainerUI.xml:494_OnClick"]:1>

Locals:
self = JNRTrainingCostsMonitor {
0 =
moneyPending = 0
LogPurchase = defined @Journalator/Source/Monitor/TrainingCosts.lua:101
OnLoad = defined @Journalator/Source/Monitor/TrainingCosts.lua:12
money = 2913110
OnEvent = defined @Journalator/Source/Monitor/TrainingCosts.lua:153
QueuePurchaseAttempt = defined @Journalator/Source/Monitor/TrainingCosts.lua:80
awaitingRemoval =

{
}
awaitingPayment =
{
}
TrainerUpdate = defined @Journalator/Source/Monitor/TrainingCosts.lua:117
npcGUID = "Creature-0-4380-1-46-3153-0000143A9A"
Reset = defined @Journalator/Source/Monitor/TrainingCosts.lua:25
}
index = 3
details = nil
(*temporary) = nil
(*temporary) = 3
(*temporary) = "Rend"
(*temporary) = "Rank 1"
(*temporary) = "used"
(*temporary) = "Rank 1"
(*temporary) = "used"
(*temporary) = "attempt to index local 'details' (a nil value)"
GetAvailableServiceClassic = defined @Journalator/Source/Monitor/TrainingCosts.lua:31
GetAvailableServiceRetail = defined @Journalator/Source/Monitor/TrainingCosts.lua:57

commented

I've included a fix in the latest alpha (available shortly)