Maintenance for the week of December 8:
• PC/Mac: No maintenance – December 8

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 August 6, 2025 3:19PM
  • 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.
  • SugaComa
    SugaComa
    ✭✭✭✭✭
    I have one called rags to riches that lets you set character amount to carry, each time you access your personal bank it will exchange currencies so if you're set to carry 1000g it will transfer the excess to the bank, or if you have less transfer them to character

    Works with gold, telvar, writs, and AP
  • Baertram
    Baertram
    ✭✭✭✭✭
    @msetten
    Here is the link to the PC addon aliases files(lua and xml) where you can see what was aliases for PC already in the past but aren't available on console -> plus you see the real API functions or constants to use then instead:

    https://github.com/esoui/esoui/tree/live/esoui/ingame/addoncompatibilityaliases
    SugaComa wrote: »
    I have one called rags to riches that lets you set character amount to carry, each time you access your personal bank it will exchange currencies so if you're set to carry 1000g it will transfer the excess to the bank, or if you have less transfer them to character

    Works with gold, telvar, writs, and AP

    Please consider posting such in the addon forums and advertise your addons there as own thread, instead of adding it as off-topic post to existing threads maybe. It provides no value nor answers any taken questions here, it only clutters the chat.

    Edited by Baertram on December 4, 2025 3:12PM
Sign In or Register to comment.