420x69x420 72 Posted November 11, 2021 Hello, in my first attempt at using the Bank Cache function of dreambot API, I am not getting any success with it, and seems to not work, but I'm not sure exactly so I'm asking if anyone is succesfully using these API calls: Bank.getBankHistoryCache() Bank.getLastBankHistoryCacheTime() Currently to test its usage I set up a simple script to call both of these methods and store them into variables, then print the variables. The method Bank.getBankHistoryCache().size() always returns 0, and Bank.getLastBankHistoryCacheTime() returns 0 always also. Opening and closing the bank, depositing/withdrawing items, setting Bank.setUseBankHistoryCache(boolean) to true or false, and calling Bank.resetCache() does nothing to create/update the cache. Am I missing something or doing it wrong?
Hans Zimmer 19 Posted November 11, 2021 My guess would be that you need to set your script to use the cache before trying to use the getCache methods. setUseBankHistoryCache(boolean useCache)
RetroBot 35 Posted November 11, 2021 I haven't needed to use that method, but I think it updates once you use a call from the banking class (ie Bank.openClosest)
420x69x420 72 Author Posted November 12, 2021 16 hours ago, Hans Zimmer said: My guess would be that you need to set your script to use the cache before trying to use the getCache methods. setUseBankHistoryCache(boolean useCache) I tried that already, and doing that alone doesn't work. 16 hours ago, RetroBot said: I haven't needed to use that method, but I think it updates once you use a call from the banking class (ie Bank.openClosest) You're right! Some calls from the banking class don't update the cache, for instance, the 2 calls I am posting about not working are part of the Bank API class. Simply calling Bank.all(); on its own line w/ no assignment works to update the bank cache if it's open.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.