CraftSim

CraftSim

2M Downloads

Error when creating auctionator shopping list - Inscription

Sludging opened this issue ยท 12 comments

commented

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:
image

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!

commented

mycharactername-servername this seems wierd hm
can you /tinspect CraftSimItemCountCache and check if this is in there as a character?

commented

can you try
/run CraftSimItemCountCache=nil
/reload

and check if this still persists?

commented

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
commented

@SanjoSolutions ah thanks for the info, then I need to take another look at that one!

commented

The bug is how fold is implemented/used. crafterUIDs has only one entry and there is this special condition in Fold when #t < 2. ;-)

commented

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.

commented

@SanjoSolutions I just checked a fold implemention in lua and then looked at my implementation again
oyfimusoqr361.jpg

commented

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.

commented

Here is a working implementation:

It has some formatting changes. Sorry for that. Maybe next time I disable the formatter before. :-D

commented

I have cleaned up the commits:

I hope it helps. Testing was very minimal. So I would recommend to test it before publishing. ;-)

commented

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.

commented

should be fixed with 14.4.0