You're not actually initialising itemsCnt until after getItemAction() is called or the set function is called with a value.
If the defaults table doesn't have an itemsCnt setting then AMine.db.profile.itemsCnt will be nil until one of those things happen.
If the value changes you would have to adjust the widgets new max value and call the set function when appropriate (like when it shows) which take you back to the text of your original question (rather than the fallout of the error) which someone with more Ace knowledge might be able to help with.
Last edited by Fizzlemizz : 09-04-20 at 02:00 PM.
|