so you have learned how to print an array(to convert it into text)
but now the next easy thing is getting a value at a certain position in an array
the basic setup is like this
so first saved a text into a var(%player%_msg) then i splitted it into elements and saved it in array(%player% array1) then i did something like this in get array
first slot is the name of array you want to get element of second is the nth number of element u want to get as a third result is the variable you want to save output in(%player%msg11) then ii did send message %player %msg1
so this is how you get an element in array
adf the output is like this
see here i have taken first element whose index number is 0 but the number of i get is 1
NOTE - array when gets saved starts at 0 like in previous guide my 0th element was "my" but when you want to get element from array u have to add one to the index number like if you want to get the first element in array its index number in saved array is 0 but you have to get element number 1
USES- very useful for staff commands ex- code @ban @unban etc but if you do "@ban ezezeez" or "ezezeez @ban" player will get banned but with this
you can check whether the first word in command is @ban or something else
second use is in items get lore then seeing with the lore is correct or you are making a game where the abilities or something are stored in items lore etc
THIS was the second lesson hope u understood questions are open
but now the next easy thing is getting a value at a certain position in an array
the basic setup is like this
so first saved a text into a var(%player%_msg) then i splitted it into elements and saved it in array(%player% array1) then i did something like this in get array
first slot is the name of array you want to get element of second is the nth number of element u want to get as a third result is the variable you want to save output in(%player%msg11) then ii did send message %player %msg1
so this is how you get an element in array
adf the output is like this
see here i have taken first element whose index number is 0 but the number of i get is 1
NOTE - array when gets saved starts at 0 like in previous guide my 0th element was "my" but when you want to get element from array u have to add one to the index number like if you want to get the first element in array its index number in saved array is 0 but you have to get element number 1
USES- very useful for staff commands ex- code @ban @unban etc but if you do "@ban ezezeez" or "ezezeez @ban" player will get banned but with this
you can check whether the first word in command is @ban or something else
second use is in items get lore then seeing with the lore is correct or you are making a game where the abilities or something are stored in items lore etc
THIS was the second lesson hope u understood questions are open