Currency function not available on console?

msetten
msetten
✭✭✭✭✭
I am working on an add-on for console that needs to access currency in the character's inventory and bank. I discovered that the following four function are to be used for this:
GetCarriedCurrencyAmount
GetBankedCurrencyAmount
DepositCurrencyIntoBank
WithdrawCurrencyFromBank
These functions work on PC, but as soon as I switch to console mode on PC or try it out on an actual console, I get a nil error message on these functions.

@ZOS_Kevin So I assume these are not available for console add-ons? Why not? Will these be added later? And is there a place where we can see which functions are not available on console?
Edited by msetten on 6 August 2025 15:19
  • ZOS_DanBatson
    ZOS_DanBatson
    ✭✭✭
    It's not so much that they're not available for console as it is that those functions are deprecated, even on PC. The only reason they work on PC is because we aliased them. But we're not bringing all of PC's aliased functions to console. These are the aliases on PC:
    function GetCarriedCurrencyAmount(currencyType)
        return GetCurrencyAmount(currencyType, CURRENCY_LOCATION_CHARACTER)
    end
    
    function GetBankedCurrencyAmount(currencyType)
        return GetCurrencyAmount(currencyType, CURRENCY_LOCATION_BANK)
    end
    
    function DepositCurrencyIntoBank(currencyType, amount)
        TransferCurrency(currencyType, amount, CURRENCY_LOCATION_CHARACTER, CURRENCY_LOCATION_BANK)
    end
    
    function WithdrawCurrencyFromBank(currencyType, amount)
        TransferCurrency(currencyType, amount, CURRENCY_LOCATION_BANK, CURRENCY_LOCATION_CHARACTER)
    end
    

    You should switch to using the new syntax and move away from the deprecated syntax. You can find all the aliases in AddonCompatibilityAliases_PC.lua
    Lead UI Engineer - The Elder Scrolls Online
    Staff Post
  • msetten
    msetten
    ✭✭✭✭✭
    Thank you so much. It works now. And thanks for replying so fast.
Sign In or Register to comment.