Loop a list variable in a list variable.

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

sandor_1234

Active Member
Jan 26, 2017
165
5
0
21
So i am making a faction skript and i have stored my faction data under {f::factions::[Faction Name]::[Data type]}
So for example: {f::factions::Immortal::creator} would store the creator of the faction.
Is there any way i could loop all factions?
I tried this:
code_language.skript:
loop {f::factions::*}:
But that returns nothing as expected.
Are there any other ways to "loop" the whole faction part?
 
MundoSK has the following expression:
code_language.skript:
tree of %objects%
Which can only be used on loops, here is an example of it:

code_language.skript:
loop tree of {f::factions::*}:

  set {_current-index::*} to branch split by "::"
  set {_faction-name} to {_current-index::1}
  set {_data-type} to {_current-index::2}

  if {_data-type} is "balance":
    set {_balanceTop::%{_faction-name}%} to loop-value
 
Status
Not open for further replies.