[Programming] Limit windowlist entries?
hey guys! so i wanted to add careers to my Alien RPG ruleset, and i'm having an issue. I figured i could use a windowlist and just make it delete the old entries when a new one is dropped in, but i'm struggling.
i've tried in the script of the windowlist:
Code:
function onListChanged()
Total = getWindowCount();
if Total > 1 then
for _,w in pairs(getWindows()) do
w.destroy(self);
end
end
end
and if i do that as just "destroy()" or "destroy(w)" instead of "w.destroy()" it crashes fantasy grounds.
i can't find a way to simply limit it. what am i missing? what else could i do to have a single "career" record on a character sheet?