I am trying to move txt from one property on active token onto a selected token, but for some reason i dont get the names of the token
I have this code:
// is a comment, excluded in macro
h: cond = '{ "range": {"upto":1, "distancePerCell":0, "token":"' +getSelected()+ '"}, "pc":1 }']
[h: IDs = getTokenNames("json", cond)]
//All the actuel ID is show, now i need to transfer them to names to be shown in input box
[h: players=""]
[t,foreach(player,IDs), CODE : {
[h: json.append(players,player)]
}]
//returns nothing
[h: status = input(
"tempPlayer | " + players + " |Player|RADIO|ORIENT=V SELECT=0"
)]
[h:abort(status)]
//shows only a single 0, no ID and no names
[h: tempPlayer2 = listget(players,tempPlayer)]
// withdrawing the name from the list i need for the other part of the code