Auctionator / Journalator

World of Warcraft addon. Keep track of your gold making on the AH, crafting orders and with vendors
https://www.curseforge.com/wow/addons/journalator
MIT License
10 stars 6 forks source link

Lua error when training a low-level toon #68

Closed b-morgan closed 1 year ago

b-morgan commented 1 year ago

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 functionBuyTrainerService' [string "@Blizzard_TrainerUI/Blizzard_TrainerUI.lua"]:458: in function `ClassTrainerTrainButton_OnClick'

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

plusmouse commented 1 year ago

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