Why does the following code initially print an incorrect output?
Hi,
I wrote the following codes to check the amount of completed artifact for each races. Lua Code:
The problem is that it prints an incorrect data on its initial click, then if I click the button again, it starts to print a correct amount. I don't get where I'm doing it wrong :confused: edit: Same behavior occurs after pressing solve button :( |
The data is probably not available when you call the functions the first time.
https://github.com/Gethe/wow-ui-sour....lua#L157-L166 |
Quote:
Would they be a cached data from last session? |
I already have code that does what you want.
Give me like maybe an hour or so until I'm ready to leave bed so I can get the code from my PC. ArchaeologyFindsTotals.toc: Code:
## Interface: 70100 lua Code:
(Credits go to Gello for this.) This will add counters to the archaeology page showing you how many finds have been completed per race. If you want it to print to chatbox instead, you should be able to change it so instead of changing the text on the archaeology pages, it would print the values to chat instead. |
Sweet :D
Will give it a shot! Thank you, Ammako! |
All times are GMT -6. The time now is 06:26 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI