Quantcast [notabug] GetItemTotalCount returns 0 for BAG_VIRTUAL - ESOUI
Thread Tools Display Modes
02/10/18, 10:37 AM   #1
manavortex
 
manavortex's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 137
[notabug] GetItemTotalCount returns 0 for BAG_VIRTUAL

Lua Code:
  1. local itemCount
  2.  
  3. _, _, itemCount = GetItemTotalCount(BAG_VIRTUAL, slotIndex)
  4. -- itemCount is now 0
  5.  
  6. _, itemCount = GetItemInfo(BAG_VIRTUAL, slotIndex)
  7. -- itemCount is now valid

Last edited by manavortex : 02/12/18 at 03:41 PM. Reason: My brain is fucked up
 
02/11/18, 06:51 AM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,022
So this function returns 2 values ? Maybe more ? It's more than someone forget to update a doc.
__________________
Obsessive Compulsive Coder

My little french Guild: Cercle de l'Eveil
 
02/11/18, 12:13 PM   #3
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 542
So I tried this on the first item in my craftbag, rough oak. I did

Code:
AA,AB,AC = GetItemTotalCount(BAG_VIRTUAL,521)
AA is 0
AB and AC are nil

I couldn't find any instance of a second return, but it's not like the first return is correct for craftbag anyway...
 
02/11/18, 01:59 PM   #4
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,426
Originally Posted by Rhyono View Post
So I tried this on the first item in my craftbag, rough oak. I did

Code:
AA,AB,AC = GetItemTotalCount(BAG_VIRTUAL,521)
AA is 0
AB and AC are nil

I couldn't find any instance of a second return, but it's not like the first return is correct for craftbag anyway...
Same for me with my first entry in the craftbag.
0, nil, nil

Tested with another item, same results.
I can't get the function to return a valid count for me.

Tested on PTS only so far.
 
02/11/18, 06:21 PM   #5
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 542
It works fine in my inventory, but I don't know what its issue is with that.
 
02/12/18, 02:57 AM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 496
Originally Posted by Rhyono View Post
I couldn't find any instance of a second return, but it's not like the first return is correct for craftbag anyway...
The craft bag uses itemId as slotIndex. I guess 521 is not an item you have in there.
__________________
@votan73 (EU - megaserver)
 
02/12/18, 05:45 PM   #7
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 542
I've semi-figured it out:

If you use it on an item in your inventory, it returns the number in your bank (if it's not in bank, returns inventory?).
You use it in the craft bag, it returns the number in your inventory.
You use it in the bank, it returns the number in your inventory.

Last edited by Rhyono : 02/12/18 at 11:45 PM.
 
02/13/18, 10:50 AM   #8
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
The code for this function is only targeting BAG_BACKPACK. It could rightly be called GetItemBackpackCount.
 

ESOUI » Developer Discussions » Bug Reports » [notabug] GetItemTotalCount returns 0 for BAG_VIRTUAL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off