Creating a list ignoring commas in variables

Talk about whatever topic you'd like, RPG related or not. (But please discuss things related to our software in the Tools section, below.)

Moderators: dorpond, trevor, Azhrei

Post Reply
User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Creating a list ignoring commas in variables

Post by AriesBreath »

Hello, here I am again searching for someone to shed some light on my problems.

Here I am trying to create a macro to consume some uses of an ability or a spell slot. The properties are stored in the token this way (as an example). The number contained between the parenthesis symbolize the number of uses remaining and the maximum number: (3/4) means the token has 3 uses remaining out of 4.

Code: Select all

Counter1: Action Surge (1/1)
Counter2: Combat Superiority (4/4)

SpellSlotLv0: Light, Sacred Flame, Thaumaturgy
SpellSlotLv1: Command, Inflict Wounds, Shield Of Faith (4/4)
SpellSlotLv2: Hold Person, Spiritual Weapon (3/3)
The macro works great with the counters as they have a single string to work with, but creates big problems with the spell slots as they contain the list of all the spells of that level separated by a comma, thing that I think goes to be read as a list instead of as a string by the macro.
My intent here is to make the macro read the spell list as a single string per property in order to get the radio buttons to be like
"Command, Inflict Wounds, Shield Of Faith (4/4) O"
instead of
"Command O
Inflict Wounds O
Shield Of Faith (4/4) O"

I tried using a different delimitator / pattern while creating the lists but it didn't work, and I don't want to use a different separator in the token property. Can someone help me?

Code: Select all

<!-- Gets selected tokens -->
[h: TokenIDs = getSelected()]

<!-- Makes sure only one token is selected -->
[h, if(listCount(TokenIDs) != 1), CODE: {
	[dialog("Macro Abort"): {
		You can select only one token. No token or multiple tokens are selected
	}]
	[h: abort(0)]
}]

<!-- Switches to token and prepares some lists -->
[h: switchToken(getSelected())]
<!-- List of Property from which to get the abilities -->
[h: CounterListPropertyName = stringToList("Counter1:Counter2:Counter3:Counter4:Counter5:SpellSlotLv0:SpellSlotLv1:SpellSlotLv2:SpellSlotLv3:SpellSlotLv4:SpellSlotLv5:SpellSlotLv6:SpellSlotLv7:SpellSlotLv8:SpellSlotLv9",":"))]
<!-- List of available abilities only -->
[h: CounterList = ""]
<!-- List of available abilities AND empty spaces -->
[h: CounterListRAW = ""]

<!-- Fills the ability lists -->
[h, foreach(Property,CounterListPropertyName,""), CODE: {
	[h: CounterListRAW = listappend(CounterListRAW,getProperty(Property))]
    [h, if(getProperty(Property) != ""): CounterList=listappend(CounterList,getProperty(Property))]
  }]

<!-- Create Menu -->
[h: StringBuild = "SelectedAbilityID|"+CounterList+"|Select the ability|RADIO|SELECT=0"]
[h: abort(input(
	"Operation|Consume,Recover|Select the operation|RADIO|SELECT=0",
	"Quantity|1|Select the quantity",
	StringBuild
	))]

<!-- Gets the selected ability, finds the remaining uses and edit them -->
[h: SelectedAbility = listGet(CounterList, SelectedAbilityID)]
[h: MaximumUses = eval(substring(SelectedAbility, indexOf(SelectedAbility, "/")+1, indexOf(SelectedAbility, ")")))]
[h: RemainingUses = eval(substring(SelectedAbility, indexOf(SelectedAbility, "(")+1, indexOf(SelectedAbility, "/")))]


<!-- Create a permission variable and checks if the user is consuming or is recovering too much -->
[h: ExecPermission = 1]
[h, if(Operation == 0), CODE: {
	[h, if(RemainingUses-Quantity < 0), CODE: {
		[h: ExecPermission = 0]
		};{
			[h: RemainingUses = RemainingUses-Quantity]
		}]
	};{
		[h: RemainingUses = min(RemainingUses+Quantity,MaximumUses)]			
	}]


<!-- If the user consumed too much, this aborts the macro and warns the user -->
[h, if(ExecPermission == 0), CODE: {
	[dialog("Macro Abort"): {
		You are consuming too much
		}]
		[h: abort(0)]
		}]

<!-- Rebuilds the property value by writing the ability name -->
[h: EditedAbility = substring(SelectedAbility, 0, indexOf(SelectedAbility, "(")+1)+RemainingUses+substring(SelectedAbility, indexOf(SelectedAbility, "/"), indexOf(SelectedAbility, ")")+1)]

<!-- Gets the name of the property to edit and replace it with the edited ability -->
[h: PropertyName = listGet(CounterListPropertyName,listFind(CounterListRAW,SelectedAbility))]
[h: setProperty(PropertyName,EditedAbility)]

User avatar
wolph42
Deity
Posts: 9744
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Creating a list ignoring commas in variables

Post by wolph42 »

sry, not helping but i saw the first lines of code and...

Code: Select all

[h:assert(listCount(TokenIDs) == 1,"Make sure (only) one token is selected",0)]
as for your actual problem. My first suggestion would indeed be: use a different list_seperator in the [foreach:]. I don't understand why that wouldn't work, i mean you can use e.g ###@@## or HEYTHISISADELIMITER or something else as silly as delimiter...

anyhoot if that fails and you run into issues with delimiter ascii in the list items: Wiki: encode() them before you add them to the list and Wiki: decode() them when you use them.

i also dont quite get why you dont use

Code: Select all

[h: CounterListPropertyName = "Counter1,Counter2,Counter3,Counter4,Counter5,SpellSlotLv0,SpellSlotLv1,SpellSlotLv2,SpellSlotLv3,SpellSlotLv4,SpellSlotLv5,SpellSlotLv6,SpellSlotLv7,SpellSlotLv8,SpellSlotLv9")]
instead of

Code: Select all

[h: CounterListPropertyName = stringToList("Counter1:Counter2:Counter3:Counter4:Counter5:SpellSlotLv0:SpellSlotLv1:SpellSlotLv2:SpellSlotLv3:SpellSlotLv4:SpellSlotLv5:SpellSlotLv6:SpellSlotLv7:SpellSlotLv8:SpellSlotLv9",":"))]
but given your using it... why not replace ":" with "HEYTHISISADELIMITER"... or just "#" probably better :D and use the same one in the foreach.

User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Re: Creating a list ignoring commas in variables

Post by AriesBreath »

Hello, I'm posting from the smartphone so I can't try the code right now.
wolph42 wrote:
Fri Dec 13, 2019 6:00 pm
sry, not helping but i saw the first lines of code and...
I'm using the "if" so that I can alert the user with a dialog if a token is not selected or if he selected more than one token. I don't know how your code works but I'll study it later.
wolph42 wrote:
Fri Dec 13, 2019 6:00 pm
as for your actual problem. My first suggestion would indeed be: use a different list_seperator in the [foreach:]. I don't understand why that wouldn't work, i mean you can use e.g ###@@## or HEYTHISISADELIMITER or something else as silly as delimiter...
I tried it but it wasn't working, it was still seeing every spell like a separate thing instead of the whole string.
wolph42 wrote:
Fri Dec 13, 2019 6:00 pm
i also dont quite get why you dont use
CODE: SELECT ALL

[h: CounterListPropertyName = "Counter1,Counter2,Counter3,Counter4,Counter5,SpellSlotLv0,SpellSlotLv1,SpellSlotLv2,SpellSlotLv3,SpellSlotLv4,SpellSlotLv5,SpellSlotLv6,SpellSlotLv7,SpellSlotLv8,SpellSlotLv9")]
instead of
CODE: SELECT ALL

[h: CounterListPropertyName = stringToList("Counter1:Counter2:Counter3:Counter4:Counter5:SpellSlotLv0:SpellSlotLv1:SpellSlotLv2:SpellSlotLv3:SpellSlotLv4:SpellSlotLv5:SpellSlotLv6:SpellSlotLv7:SpellSlotLv8:SpellSlotLv9",":"))]
Your code was my first method but then I was trying to change the separator. I don't know if it is possible to do it without the stringToList, so I used it and I made some experiments, without success unfortunately. If you (or someone other) could try the code and explain to me why it isn't working I would be glad

User avatar
wolph42
Deity
Posts: 9744
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Creating a list ignoring commas in variables

Post by wolph42 »

the assert is doing the same but lot less code.

what you probably got wrong is that you ALSO need to set the correct delimiter in the [foreach:] roll option!
its possible without the stringtolist, but probably inpractible, depends... strintolist basically is a search and replace in disguise, so you can set it manually as well in this case. But again, the important part is that the foreach or any other place where you go through the list, you set the delimiter correctly!!

try it, if it fails, post that code and i or someone else will have a look.

User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Re: Creating a list ignoring commas in variables

Post by AriesBreath »

I copied some code in another macro and write it so that it print the result on the chat. I tried by setting ":" as separator either in stringTolist and in forEach, but it prints everything separated by commas. I tried this with a list either separated by a comma and by ":", here I pasted the ":" version.

Code: Select all

<!-- Switches to token and prepares some lists -->
[h: switchToken(getSelected())]
<!-- List of Property from which to get the abilities -->
[h: CounterListPropertyName = stringToList("Counter1:Counter2:Counter3:Counter4:Counter5:SpellSlotLv0:SpellSlotLv1:SpellSlotLv2:SpellSlotLv3:SpellSlotLv4:SpellSlotLv5:SpellSlotLv6:SpellSlotLv7:SpellSlotLv8:SpellSlotLv9",":"))]
<!-- List of available abilities only -->
[h: CounterList = ""]
<!-- List of available abilities AND empty spaces -->
[h: CounterListRAW = ""]

<!-- Fills the ability lists -->
[h, foreach(Property,CounterListPropertyName,":"), CODE: {
	[h: CounterListRAW = listappend(CounterListRAW,getProperty(Property))]
    [h, if(getProperty(Property) != ""): CounterList=listappend(CounterList,getProperty(Property))]
  }]

[r: CounterListRAW]
[r: CounterList]
I tried using a delimiter in stringToList, either when the counters and spell slots were separated by a comma and by the ":". This is even worse as it doesn't print anything

Code: Select all


<!-- Switches to token and prepares some lists -->
[h: switchToken(getSelected())]
<!-- List of Property from which to get the abilities -->
[h: CounterListPropertyName = stringToList("Counter1:Counter2:Counter3:Counter4:Counter5:SpellSlotLv0:SpellSlotLv1:SpellSlotLv2:SpellSlotLv3:SpellSlotLv4:SpellSlotLv5:SpellSlotLv6:SpellSlotLv7:SpellSlotLv8:SpellSlotLv9",":","##"))]
<!-- List of available abilities only -->
[h: CounterList = ""]
<!-- List of available abilities AND empty spaces -->
[h: CounterListRAW = ""]

<!-- Fills the ability lists -->
[h, foreach(Property,CounterListPropertyName,"##"), CODE: {
	[h: CounterListRAW = listappend(CounterListRAW,getProperty(Property))]
    [h, if(getProperty(Property) != ""): CounterList=listappend(CounterList,getProperty(Property))]
  }]

[r: CounterListRAW]
[r: CounterList]

Also I have a bad feeling that even if the lists were made using something different from the comma, the Input will not be able to read it correctly as the rows are separated by commas (for what I know).

Code: Select all

<!-- Create Menu -->
[h: StringBuild = "SelectedAbilityID|"+CounterList+"|Select the ability|RADIO|SELECT=0"]
[h: abort(input(
	"Operation|Consume,Recover|Select the operation|RADIO|SELECT=0",
	"Quantity|1|Select the quantity",
	StringBuild
	))]
I attached a mockup of what I actually get and what I would like to get.
Attachments
Wrong Result.JPG
Wrong Result.JPG (25.35 KiB) Viewed 768 times
Mockup.jpg
Mockup.jpg (68.86 KiB) Viewed 770 times
Last edited by AriesBreath on Sat Dec 14, 2019 5:50 am, edited 1 time in total.

User avatar
aliasmask
Deity
Posts: 8592
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Creating a list ignoring commas in variables

Post by aliasmask »

Your commas looks suspect. Probably a different character that looks like a comma. You'll have to determine which unicode character they are and replace them with a comma.

To debug the unicode character you can use Wiki: encode() and it will return something like %2C if it's a comma but something like %FF%0C as a windows (full width) comma. Using Wiki: replace() can change it back to %2C and then you can un-encode with Wiki: decode().

User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Re: Creating a list ignoring commas in variables

Post by AriesBreath »

aliasmask wrote:
Sat Dec 14, 2019 5:37 am
Your commas looks suspect. Probably a different character that looks like a comma.
Are you talking about the mockup? It's an image I made in photoshop to show what I was trying to get

User avatar
Full Bleed
Demigod
Posts: 4463
Joined: Sun Feb 25, 2007 11:53 am
Location: MD
Contact:

Re: Creating a list ignoring commas in variables

Post by Full Bleed »

AriesBreath wrote:
Sat Dec 14, 2019 5:45 am
It's an image I made in photoshop to show what I was trying to get
Just popping in to help get your output to look like your mock-up:

Code: Select all

[h: counterList = "<html>Light&#44; Sacred Flame&#44; Thaumaturgy</html>, <html>Command&#44; Inflict Wounds&#44; Shield of Faith</html>, <html>Hold Person&#44; Spiritual Weapon</html>"]

[h: StringBuild = "SelectedAbilityID|"+counterList+"|Select the ability|RADIO|SELECT=0"]
[h: abort(
		input(
			"Operation|Consume,Recover|Select the operation|RADIO|SELECT=0",
			"Quantity|1|Select the quantity",
			StringBuild
		)
	)
]
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Re: Creating a list ignoring commas in variables

Post by AriesBreath »

Full Bleed wrote:
Sat Dec 14, 2019 6:13 am
Just popping in to help get your output to look like your mock-up:
Thanks, but the problem is that I can't make to use a different separator, so it reads everything as a different entry

EDIT: oh, it was just for output a mockup, I got it now

User avatar
wolph42
Deity
Posts: 9744
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Creating a list ignoring commas in variables

Post by wolph42 »

i noticed that you didn't set a correct deimiter for Wiki: listAppend() (so it wil default to ,) and again in [foreach:] is see you setting an output delimeter but NOT the list delimiter (so it will default to ,)!! Read the wiki and the examples carefully for the functions! However I also don't see you using the output of the foreach, so that point is moot. Its hard to determine for me WHERE your building the ACTUAL list and where you're using it

edit: ok I've found it, forget the above, you're issue lies in the variable counterList (It really helps if you just state the variable in your question which is giving you the headache instead of simply dumping all the code on forum readers). It would also have helped in your first post that you were talking about the input() function (you didn't).

So the input in counterlist is indeed tricky as the radiobuttons require a stringlist in which you also canNOT set the delimiter: which mean that I don't think its possible! You'll either need to use checkboxes or move everything to an html form or use something else then "," in your items! e.g. "-". I was contemplating about use of encode decode, but that won't work either.

User avatar
aliasmask
Deity
Posts: 8592
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Creating a list ignoring commas in variables

Post by aliasmask »

After some re-reads, I think I get what you're asking. This should work:

Code: Select all

[H: propNameList = "list1,list2,list3"]
<!-- props and their values
   list1 = "Name1: val1, val2, val3"
   list2 = "Name2: opt1, opt2, opt3"
   list3 = "Name3: num1, num2, num3"
-->

<!-- make new list with only final values -->
[H: newList = ""]
[H, foreach(propName,propNameList), code: {
   [H: value = getProperty(propName)]
   <!-- get everything after : -->
   [H: list = listGet(value,1,":")]
   [H: list = "<html>" + replace(list,",","&#44;") + "</html>"]
   [H: newList = listAppend(newList, list)]
}]
edit: So, I'm guessing there is no : in your list. You're just using it to separate the prop name from the list.

User avatar
aliasmask
Deity
Posts: 8592
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Creating a list ignoring commas in variables

Post by aliasmask »

Less any syntax errors, I think this will do what you want:

Code: Select all

<!-- Gets selected tokens -->
[h: assert(listCount(getSelected()) == 1,"Make sure (only) one token is selected",0)]

[h: switchToken(getSelected())]

<!-- List of Property from which to get the abilities -->
[h: abilityPropNames = "Counter1,Counter2,Counter3,Counter4,Counter5,SpellSlotLv0,SpellSlotLv1,SpellSlotLv2,SpellSlotLv3,SpellSlotLv4,SpellSlotLv5,SpellSlotLv6,SpellSlotLv7,SpellSlotLv8,SpellSlotLv9"]

[H: CounterList = ""]
[H: masterList = "{}"]
[H, foreach(propName,abilityPropNames), code: {
   [H: list = getProperty(propName)]
   [H, if(! json.isEmpty(list)), code: {
      [H: list.input = "<html>" + replace(list,",","&#44;") + "</html>"]
      [H: CounterList = listAppend(CounterList, list.input)]
      [H: masterList = json.set(masterList, propName, list)]
   };{}]
}]

<!-- Create Menu -->
[h: StringBuild = "SelectedAbilityID|"+CounterList+"|Select the ability|RADIO|SELECT=0"]
[h: abort(input(
	"Operation|Consume,Recover|Select the operation|RADIO|SELECT=0",
	"Quantity|1|Select the quantity",
	StringBuild
))]

<!-- Gets the selected ability, finds the remaining uses and edit them -->
[H: selectedProp = json.get(json.fields(masterList,"json"),SelectedAbilityID)]
[h: SelectedAbility = json.get(masterList, selectedProp)]

[H: regex = "[(]([0-9]+)/([0-9]+)[)]"]
[H: contiunue = 1]
[H: updateUses = 0]
[H: output = ""]
[H: findId = strfind(SelectedAbility,regex)]
[H, if(getFindCount(findId)), code: {
   [H: remainingUses = getGroup(findId,1,1)]
   [H: maxUses = getGroup(findId,1,2)]
   [H: newUses = if(operation,min(maxUses,Quantity+remainingUses),max(0,remainingUses-Quantity))]
   [H, if(newUses == remainingUses): continue = 0; updateUses = 1]
};{}]

[H, if(continue), code: {
   [H, if(updateUses), code: {
      [H: updatedAbility = replace(SelectedAbility,strformat("%{remainingUses}/%{maxUses}"),strformat("%{newUses}/%{maxUses}"))
      [H: setProperty(selectedProp,updatedAbility)]
      [H: output = strformat("Ability Updated: %{selectedProp} (%+d) - %{updatedAbility}",newUses - remainingUses)]
   };{
      [H: output = strformat("Ability Used: %{selectedProp} - %{SelectedAbility}")]
   }]
};{
   [dialog("Macro Abort"): { No change in uses. }]
}]

[R, if(! json.isEmpty(output)): output]


User avatar
AriesBreath
Cave Troll
Posts: 32
Joined: Thu May 02, 2019 10:37 am

Re: Creating a list ignoring commas in variables

Post by AriesBreath »

wolph42 wrote:
Sat Dec 14, 2019 7:01 am
edit: ok I've found it, forget the above, you're issue lies in the variable counterList (It really helps if you just state the variable in your question which is giving you the headache instead of simply dumping all the code on forum readers). It would also have helped in your first post that you were talking about the input() function (you didn't).
Sorry, I thought I explained correctly my problem, I didn't mean to just dump the code and make the others work for me, next time I'll try to explain better.
wolph42 wrote:
Sat Dec 14, 2019 7:01 am
So the input in counterlist is indeed tricky as the radiobuttons require a stringlist in which you also canNOT set the delimiter: which mean that I don't think its possible!
Indeed I think that too, so yesterday I came up with the idea to replace temporarily the comma with something other (I choose ";"). The code was already working but today I read the Aliasmask reply that, from what I noticed, used the same expedient.

So I tried the code but it wasn't working, it prints this in chat

Code: Select all


    [H, if(continue), code: { [H, if(updateUses), code: { [H: updatedAbility = replace(SelectedAbility,strformat("%{remainingUses}/%{maxUses}"),strformat("%{newUses}/%{maxUses}")) [H: setProperty(selectedProp,updatedAbility)] [H: output = strformat("Ability Updated: %{selectedProp} (%+d) - %{updatedAbility}",newUses - remainingUses)] };{ [H: output = strformat("Ability Used: %{selectedProp} - %{SelectedAbility}")] }] };{ [dialog("Macro Abort"): { No change in uses. }] }] [R, if(! json.isEmpty(output)): output]
I'm not able to read or understand strformat, I already tried but I have to study it better, so I can't decipher what the error code is saying. So I looked at the rest of the code and I found something very handy: the regex code to find the numbers of uses inside the parenthesis.

I corrected my code, removed some useless variables and replaced some bits with the regex system and now I think it fully works. It gets only the ability with uses and edits them correctly.

Code: Select all

<!-- Gets selected tokens -->
[h: TokenIDs = getSelected()]

<!-- Makes sure only one token is selected and, if it isn't, warns the user with a pop up dialog-->
[h, if(listCount(TokenIDs) != 1), CODE: {
	[dialog("Macro Abort"): {
		You can select only one token. No token or multiple tokens are selected
	}]
	[h: abort(0)]
}]

<!-- Switches to token and prepares some lists -->
[h: switchToken(getSelected())]
<!-- List of Property from which to get the abilities -->
[h: CounterListPropertyName = "Counter1,Counter2,Counter3,Counter4,Counter5,SpellSlotLv0,SpellSlotLv1,SpellSlotLv2,SpellSlotLv3,SpellSlotLv4,SpellSlotLv5,SpellSlotLv6,SpellSlotLv7,SpellSlotLv8,SpellSlotLv9"]
<!-- List of available abilities only -->
[h: CounterList = ""]

<!-- Fills the ability lists -->
[h, foreach(Property,CounterListPropertyName,":"), CODE: {
	[H: regex = "[(]([0-9]+)/([0-9]+)[)]"]
	[H: findId = strfind(getProperty(Property),regex)]
    [h, if(getFindCount(findId)): CounterList=listappend(CounterList,replace(getProperty(Property),",",";"))]
  }]


<!-- Create Menu -->
[h: StringBuild = "SelectedAbilityID|"+CounterList+"|Select the ability|RADIO|SELECT=0"]
[h: abort(input(
	"Quantity|1|Select the quantity",
	"Operation|Consume,Recover|Select the operation|RADIO|SELECT=0",
	StringBuild
	))]

<!-- Gets the selected ability, finds the remaining uses and edit them -->
[h: SelectedAbility = replace(listGet(CounterList, SelectedAbilityID),";",",")]
[H: findId = strfind(SelectedAbility,"[(]([0-9]+)/([0-9]+)[)]")]
[h: RemainingUses = getGroup(findId,1,1)]
[h: MaximumUses = getGroup(findId,1,2)]


<!-- Create a permission variable and checks if the user is consuming or is recovering too much -->
[h: ExecPermission = 1]
[h, if(Operation == 0), CODE: {
	[h, if(RemainingUses-Quantity < 0), CODE: {
		[h: ExecPermission = 0]
		};{
			[h: RemainingUses = RemainingUses-Quantity]
		}]
	};{
		[h: RemainingUses = min(RemainingUses+Quantity,MaximumUses)]			
	}]


<!-- If the user consumed too much, this aborts the macro and warns the user -->
[h, if(ExecPermission == 0), CODE: {
	[dialog("Macro Abort"): {
		You are consuming too much
		}]
		[h: abort(0)]
		}]

<!-- Rebuilds the property value by writing the ability name -->
[h: EditedAbility = substring(SelectedAbility, 0, indexOf(SelectedAbility, "(")+1)+RemainingUses+substring(SelectedAbility, indexOf(SelectedAbility, "/"), indexOf(SelectedAbility, ")")+1)]

<!-- Gets the name of the property to edit and replace it with the edited ability -->
[h, foreach(Property, CounterListPropertyName), CODE: {
	[h, if(SelectedAbility == getProperty(Property)), CODE: {
	[h: setProperty(Property, EditedAbility)]
	}]
}]
Thanks to all for the help, and sorry for not explaining well the problem from the beginning

Post Reply

Return to “General Discussion”