the long story short, Ive made a Lib token that holds information regarding individual characters.
it holds it all in one Token property. an array. their are two arrays inside of said 'parent' array. One for Active players, and Inactive players.
the idea is to have all the active players easily accessible without me having to edit a list every time someone decides not to show, or sidelines a character. etc. I can just click a button and give all active players XP and Fate. etc. Its pretty convenient.
Not sure if its pert ant information or not, but the macro that i am working on at the moment deals with a part of the character. The jsons that i am working with are inception levels of information. Total Character roster -> active/Inactive rosters -> Individual character jsonObjects -> and then each of some dozen or so nuggets of info like XP, Date created, Wallet, Etc.
Now. On to my issue.
I have a macro thats function at this moment is to extract an object out of the character object so i can modify it. No problems there. Ive done it some 15 or 20 times to modify other pieces of the property.
BUT. For some reason, that i can neither understand, or track, or anything. it is randomly overighting the total roster. Which doesnt make any sense. seeing as how nothing is saving to a token property anywere in the macro. its just pulling from it. but for whatever the reason, its just deleting the Lib token peoperty to blank. Ive done everything within my power to try and fix it. or at the very least figure out how or why its happening. but im just pulling blanks.
the code that is doing it is LITERALLY copy pasted from other macros that don't do this. i dont understand what is happening.
any thoughts or ideas?
Code: Select all
<!--
==============================
Macro is called from a either, A) macrolink in from the individual character frame.
or B) just a floating macro. used while game is in session.
it is used to add a new Test to the character or to modify a test already present.
==============================
-->
<!-- Step 1. Get all relevant Variables. save them for future macro use. -->
[h: CharacterList = ""]
[h: TotalRoster = getLibProperty("CharacterList", "Lib:Rewards") ]
[h: ActiveRoster = json.get(TotalRoster, 0)]
[h: UnactiveRoster = json.get(TotalRoster, 1)]
<!--========================================================================================================-->
[FOREACH(Character, ActiveRoster, "<br>") , CODE:
{
[h: count=roll.count]
[h: CharSlot = json.get(ActiveRoster, count)]
[h: CharName = json.get(CharSlot, "Character")]
[h: CharacterList = listAppend(CharacterList, CharName)]
} ]
[h: Pause("CharacterList")]
<!--========================================================================================================-->