Cache suggestions
Hello!
Example of my code: Code:
local Immerseus_LFR = { Any suggestions/tips on how to solve this? I can't have the addon caching every table when you login because it will be too many tables & data in the end (I assume), so a better way would be: When you click the "raid". Cache the items -> show items. Or Have a "Grab Items" button that you click when you want to use the addon maybe(?) Have used this for single items earlier but not quite sure how to tweak it for the best solution. I might find a good solution once I know the best way to deal with cache in this situation. Not that experienced with LUA. Code:
local wait = {} Code:
function CreateItemList(Instance, Difficulty, newFrame) |
|
Quote:
Can do my best and share the result, and get some input. |
I am using a check
Lua Code:
|
Quote:
|
Quote:
Code:
wait=={} just test Lua Code:
|
Explaining why, {}=={} is not doing anything special to compare values in tables. What it does is create two completely different tables and compare their pointers. Since they are exactly two different tables, their pointers are different and this results in false. If you want to check if the table is empty, the most basic way is to call next(wait) and see if it returns nil.
|
All times are GMT -6. The time now is 06:54 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI