#Congratulations, I need help removing duplicates from the {playersDealDamage} list, how this can be

1 messages · Page 1 of 1 (latest)

inland void
#

here's the code:

on damage:
if attacker is player:        
  remove duplicates from {playersDealDamage::*} 
  set {_attacker} to attacker 
  add {_attacker} to {playersDealDamage::*}
 


it is necessary to remove duplicates from the list, but has not yet found suitable solutions, read the documentation, used artificial intelligence, everything is in vain, I will be glad if you help, or bring it to the right solution. Thank you 🥰

P.S: remove duplicates from {playersDealDamage::*} isn`t work

brazen dock
#
  1. Please format your code in discord, so characters like * and _ dont italicise it
    ```
    code here
    ```
  2. AI code is not allowed, #welcome-to-skunity rule 8
  3. loop through the list, and add them to a new local list if the local list doesnt already contain that element, then set the original list to the local list