Error when creating auctionator shopping list - Inscription
Sludging opened this issue ยท 12 comments
Addon Version: 14.2.5
Getting the following error message when trying to create a shopping list for my queue in Inscription:
Message: ...ce/AddOns/CraftSim/Modules/CraftQueue/CraftQueue.lua:482: attempt to perform arithmetic on local 'totalItemCount' (a string value)
Time: Fri Jan 26 23:25:19 2024
Count: 1
Stack: ...ce/AddOns/CraftSim/Modules/CraftQueue/CraftQueue.lua:482: attempt to perform arithmetic on local 'totalItemCount' (a string value)
[string "@Interface/AddOns/CraftSim/Modules/CraftQueue/CraftQueue.lua"]:467: in function `CreateAuctionatorShoppingListAll'
[string "@Interface/AddOns/CraftSim/Modules/CraftQueue/CraftQueue.lua"]:304: in function `CreateAuctionatorShoppingList'
[string "@Interface/AddOns/CraftSim/Modules/CraftQueue/Frames.lua"]:421: in function `clickCallback'
[string "@Interface/AddOns/CraftSim/Libs/GGUI/GGUI.lua"]:1598: in function <Interface/AddOns/CraftSim/Libs/GGUI/GGUI.lua:1596>
This is a picture of my queue:
I've been able to queue up other professions / crafts so seems to be something specific with this combination (although I doubt it's specific to inscription)
Let me know if I can provide any more info!
mycharactername-servername this seems wierd hm
can you /tinspect CraftSimItemCountCache and check if this is in there as a character?
can you try
/run CraftSimItemCountCache=nil
/reload
and check if this still persists?
Yeah it persist even after running that.
Not sure if this info also helps:
Locals: reagentMap = <table> {
194784 = <table> {
}
194856 = <table> {
}
194857 = <table> {
}
194858 = <table> {
}
198487 = <table> {
}
}
crafterUIDs = <table> {
1 = "mycharactername-servername"
}
print = <function> defined @Interface/AddOns/CraftSim/Util/Util.lua:14
CraftSim = <table> {
STATISTICS = <table> {
}
COST_DETAILS = <table> {
}
.... (a bunch more empty tables
@SanjoSolutions ah thanks for the info, then I need to take another look at that one!
The bug is how fold is implemented/used. crafterUIDs has only one entry and there is this special condition in Fold when #t < 2. ;-)
Sorry, was before raid before I commented. It seems that here it's required to give "Fold" an initial value of 0 (like it's possible in the JavaScript equivalent). And to change the implementation of "Fold" to accept such initial value.
I hope you see what happens, when crafterUIDs is a table with one entry.
@SanjoSolutions I just checked a fold implemention in lua and then looked at my implementation again
mycharactername-servername this seems wierd hm can you /tinspect CraftSimItemCountCache and check if this is in there as a character?
Oh sorry for that, I didn't want to share my char name if I didn't have to so I edited it.
Really sorry if that confused you somewhat, it totally had the real name in there.
Here is a working implementation:
It has some formatting changes. Sorry for that. Maybe next time I disable the formatter before. :-D
I have cleaned up the commits:
I hope it helps. Testing was very minimal. So I would recommend to test it before publishing. ;-)
I can confirm the changes suggested by @SanjoSolutions fixes the error on my end and the list gets created on the Auctionator side.
Not much of a wide test case but at least solves my reported issue.