BadScript

Array

Can contain a variable length list of Objects that can be indexed(starting at 0).

array = []
array = [
	"element0",
	"element1",
	true,
	11
]

Default Operators

Implemented Functions

Add

Adds one or more objects to the array.

array = []
array.Add(true) //Adds true to the array
array.Add(1, 2, 3, "Hello World", null) //Adds those elements to the array

Required Parameters

Optional Parameters

Clear

Clears all items from the list

array = [ 1, true, null ]
array.Clear() //Array is now empty

ContentEquals

Returns true if the specified array and this array have the same contents

array1 = [
	1, 2, 3
]

array2 = [
	1, 2, 3
]

if(array1.ContentEquals(array2))
{
	//Array Contents are equal
}

Remove

Removes the first occurence of one or more elements from the list that are equal to the ones specified.

array = [1, 2, 3]
array.Remove(2) //Array Content: [1, 3]
array.Remove(1, 3) //Array Content: []

Required Parameters

Optional Parameters

RemoveAt

Removes one or more elements at the specified indices from the list.

array = [1, 2, 3]
array.RemoveAt(1) //Array Content: [1, 3]
array.RemoveAt(1, 0) //Array Content: []

Required Parameters

Optional Parameters

Reverse

Reverses the Order of the Elements in the list

array = [1, 2, 3]
array.Reverse() //New Array Order: [ 3, 2, 1 ]

Size

Returns the amount of elements in the list

array = [1, 2, 3]
array.Size() //Returns 3

Swap

Swaps two elements in the list.

array = [1, 2, 3]
array.Swap(0, 1) //New Array Order: [2, 1, 3]

Required Parameters

List of all Built-In Types