[ENGLISH GUIDE] On Insert Element, Delete Element and Replace Element

ezplays

Новичок
Регистрация
3 Май 2023
Сообщения
37
S yeah this is lesson 3 very easy one and probably not the most important one in arrays(because I do not use it too much)
So First Insert Element as the name implies you insert an element at the designated spot(index number) on array
so to print the change in arrays the total setup is like this 2023-05-09_08.31.50.png
you can remove all the convert to text and send message
so yeah all the magic happens in this insert element chest which is like this
1683601602017.png
first is the array which you want to edit second the index number of element you want to insert ur element in ARRAY STARTS AT 1 so yeah keep that in mind
third is the value you want to add to the array
i tested this and here is the result
1683601741528.png
when I inserted 3 at the 3rd position(index number 2 but as array starts at 1 you have to add one) the below elements gets pushed down this is the function of Insert element
USES- not many I can think of individually but with delete element there can be many
mostly used in editing lore of items

DELETE ELEMENT
as the name implies it deletes element nothing much to explain pretty self explanatory
here is the setup 2023-05-09_08.42.14.png
and here the chest where the deleting occurs
1683602037545.png
u just insert the array and the index number of element(+1 cuz array starts at 1)
and here is the result
1683602207697.png
see the element that had the 3rd position got deleted so this is the function of delete element

USES- you can use it with insert element to replace an element but wait
ISNT THERE REPLACE ELEMENT TOO??

REPLACE ELEMENT
it replaces the value of element to any other value of your choice
basic setup is the same but with replace element in place of delete element
the chest where all things happen look like this
1683602422948.png
first is the name of array u want to edit second is the index no. of array (array starts at 1 for +1) and third is the value u want to replace
and the result looks like this
1683602547352.png
so the ezezeez got replaced by robot so this is the function of replace element
USES- many uses I can think of but wont point out cuz its your job to innovate(totally not lazy)

hope u understood questions are open
 
Сверху