A guide to using arrays

Informational page

NOTE Before I begin, I would like to address the claim that you need to CREATE an array before executing code with said array. First of all, this is false. Any actions done to an array, if said array can not be found, a new array with the same name will be created

NOTE I highly don’t recommend using %player% or other player specific placeholders in your arrays as it takes a near expert level of skill to get these arrays to work and they almost never work in codes besides selection codes

WARNING Arrays are very complex pieces of code, this guide is for experienced coders, not for beginners. Even if. This may need to be read more than once to get a full understanding of how they work. I don’t blame you if you don’t understand


Arrays are like a giant line of sort, imagine an element as a person in that line. Imagine the blocks of an array as adding people into the line, them cutting the line, or removing them from the line. You can also add lines to the end of another line.

NOTE for real coders, not mineland, you can imagine an array in mineland as a strange table. Each element being a variable on that table

Block #1: Create array

WARNING Create array is only for high level codes and other things, if you are a less experienced coder or don’t fully understand arrays, you should only use the create array tool to wipe all elements of an array. If this is not you, skip this section

Function #1: wiping array data
If you have a large array that you want to reset, you can create an array with no values, or force input values of the same name. The newer array will override the old one causing it to be deleted and all the data lost. I would always reccomend making a backup array on creation with a function, but it is your choic.

Function #2: Regular creation
Sometimes, you need an array with force-input values, or can’t just have one created by an element chain. This is simple, just create the array with the code. This will make an empty array of that name ready to be used

Block #2: Append element

NOTE this will consider the lowest slot possible. If you have an array that skipcounts by 2s, then the position will be filled between 0 and 2.

WARNING If you set an element higher than the length of the array, it will do the append function

This block is very basic, you can store anything in this array including all variables

Block #3: get element

WARNING It can scan for values that don’t exist. If an array is only 20 elements large and you scan for element 99, it will read as blank. Be careful if you are using variables or an automatic function as it can ruin your entire code if you are not careful

Getting an element from an array is a way to scan the value of one position in it. Depending on the number you input (can be a dynamic variable), it will find that number in the specified array and then set the output variable to that value. If an array slot doesnt exist, it will be set to a blank variable.

Block #4: Insert element

WARNING This is a very specific code feature. On use, this will push the values higher than the set value back (adding 1 to them).

Inserting an element is like putting a person in x position in a queue, it will push everyone back. Unlike it’s counterpart (set variable), this will also effect the original position. If you are trying to set array line 3 to “test” but there allready is a line 3 called “test2”, line4 will be “test2” and every element after the set position will have their position raised by one

Block #5: Replace / set element

WARNING You should always make a save of the element you are setting because, if there is a mistake. This item will be deleted permanently.

NOTE If you set an item, no following items will change. This is good for removing positions from a queue or changing a players stats or text altering

Set element will scan for x in an array, if x is higher than the array’s highest number. It will append the change and not delete an element. It can be used for deleting specific rows in an array.

Block #6: Join arrays

WARNING This is a very hard to use function.

This will add the second array to the end of the first one. The closest value to the left in the gui is the original array and output array, the one to the right is the array you are adding to the end of it. If array #1 has 6 elements and array #2 has 19, then array #1 will have 25 elements. All of array #2’s elements will have their position (x) added by the length of array (y) and then added to array #1.

Block #7: Get length of array

NOTE This is very useful for queue systems for your game or finding out how many things there are in a list. Be careful for automatic math functions as one change to the array can drastc


these are just basic things, there are WAY more blocks I will add soon

Great guide thankzfrfrfrfrfrfr