Hello !
TLDR: I want to split text "variable \n variable \n variable" on each "\n" and turn "variable" into an element of a list.
After looking in java code, docs and other horrible things i'm in front of this little easy problem but i just can't find the right exact way to write it.
So i have a huge string in this form : "variable \n variable \n variable"
I want to get them into a list (named "{%player%.quests.list::*}" )
Objective is to loop this list like this and setup a gui with it :
I just can't make the "split" function works for some reason. Probably because it's a \n. Works fine on letters.
Bonus : Is there a type of loop in skript that will make me win some time and increment a number by itself (To know how many loop i did before) or am i doing right by using my own variable. ( i in this exemple)
Thanks !
Hope my english isn't terrible.
New on this forum and not sure how i'm supposed to ask for help?
TLDR: I want to split text "variable \n variable \n variable" on each "\n" and turn "variable" into an element of a list.
After looking in java code, docs and other horrible things i'm in front of this little easy problem but i just can't find the right exact way to write it.
So i have a huge string in this form : "variable \n variable \n variable"
I want to get them into a list (named "{%player%.quests.list::*}" )
Objective is to loop this list like this and setup a gui with it :
Code:
loop {%player%.quests.list::*}:
set {quest} to loop-value
format gui slot { i } of player with book named "%{quest}%"
I just can't make the "split" function works for some reason. Probably because it's a \n. Works fine on letters.
Bonus : Is there a type of loop in skript that will make me win some time and increment a number by itself (To know how many loop i did before) or am i doing right by using my own variable. ( i in this exemple)
Thanks !
Hope my english isn't terrible.
New on this forum and not sure how i'm supposed to ask for help?
Last edited: