e2 docs table - wiremod/wire GitHub Wiki

Jump to table of contents

Table

Table = table(...)

(1 ops)

Table:clear()

Clears the table (1 ops)

Number = Table:count()

Returns the number of entries in the table. Does not add the entries in subtables (1 ops)

Number = Table:ncount()

Returns the number of sequential numerical indexes (3 ops)

Number = Table:exists(Number Index)

Returns 1 if the table contains any value at specified index (1 ops)

Number = Table:exists(String Index)

Returns 1 if the table contains any value at specified index (1 ops)

printTable(Table Tbl)

Prints a table like the lua function PrintTable does, except to the chat area (5 ops)

Table = Table:flip()

Returns a flipped copy of the table. Only affects string values in the array part and number values in the table part (5 ops)

Table = Table:typeids()

Returns a new table with the typeids of the table (5 ops)

Number = Table:remove(Number Index)

Removes the specified entry from the array-part and returns 1 if removed (5 ops)

Number = Table:unset(String Index)

Force removes the specified entry from the table-part, without moving subsequent entries down and returns 1 if removed (5 ops)

Number = Table:remove(String Index)

Removes the specified entry from the table-part and returns 1 if removed (5 ops)

Number = Table:unset(Number Index)

Force removes the specified entry from the array-part, without moving subsequent entries down and returns 1 if removed (5 ops)

Table = Table:clipToTypeid(String Typeid)

Removes all entries not of the specified type (5 ops)

Table = Table:clipFromTypeid(String Typeid)

Removes all entries of the specified type (5 ops)

Table = Table:clone()

Returns a copy of the table (10 ops)

String = Table:id()

Returns the unique ID of the table (1 ops)

String = Table:toString()

Formats the table as a human-readable string (5 ops)

Table = Table:add(Table Rv2)

Adds the contents of the second table to the end of the first table. Returns new table (5 ops)

Table = Table:merge(Table Rv2)

Merges T2 with T. Any variables with the same indexes are overwritten by T2's variables (5 ops)

Table = Table:difference(Table Rv2)

Removes all variables with keys that exist in T2 (5 ops)

Table = Table:intersect(Table Rv2)

Removes all variables with keys which don't exist in T2 (5 ops)

Number = Table:pop()

Removes the last entry in the array-part and returns 1 if removed (3 ops)

Number = Table:shift()

Removes the first element of the table; all other entries will move down one address and returns 1 if removed (3 ops)

Number = Table:min()

Returns the smallest numerical entry in the array-part (5 ops)

Number = Table:max()

Returns the largest numerical entry in the array-part (5 ops)

Number = Table:maxIndex()

Returns the index of the largest numerical entry in the array-part (5 ops)

Number = Table:minIndex()

Returns the index of the smallest numerical entry in the array-part (5 ops)

Array = Table:typeidsArray()

Returns an array with the typeids of the array-part of the table (5 ops)

Array = Table:toArray()

Converts the table into an array. (Note that there is no R:totable() function because E2 arrays do not save typeids) (5 ops)

Table = findToTable()

Inserts the finds from an entity discovery event into an table's array-part and returns it. (Basically the same as findToArray()) (20 ops)

String = Table:concat()

Concatenates the array-part of the table (1 ops)

String = Table:concat(String Delimiter)

Concatenates the array-part of the table, with a string delimiter (1 ops)

String = Table:concat(String Delimiter, Number Startindex)

Concatenates the array-part of the table, starting at index N, with string S in between each (1 ops)

String = Table:concat(String Delimiter, Number Startindex, Number Endindex)

Concatenates the array-part of the table, starting at index N1 and ending at N2, with string S in between each (1 ops)

String = Table:concat(Number Startindex)

Concatenates the array-part of the table, starting at index N (1 ops)

String = Table:concat(Number Startindex, Number Endindex)

Concatenates the array-part of the table, starting at index N1 and ending at N2 (1 ops)

Table = invert(Array Arr)

Inverts the array, creating a lookup table (5 ops)

Table = invert(Table Tbl)

Inverts the table, creating a lookup table (5 ops)

Array = Table:keys()

Returns an array with the keys of the table (5 ops)

Array = Table:values()

Returns an array with the values of the table (tables and arrays, which arrays do not support, are discarded) (5 ops)

Bone = Table:removeBone(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Effect = Table:removeEffect(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

ComplexNumber = Table:removeComplex(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Matrix4 = Table:removeMatrix4(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Angle = Table:removeAngle(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Quaternion = Table:removeQuaternion(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Table = Table:removeTable(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Stcontrol = Table:removeStcontrol(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

String = Table:removeString(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Matrix = Table:removeMatrix(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Matrix4 = Table:removeMatrix2(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Tracedata = Table:removeTracedata(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Vector2 = Table:removeVector2(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Ftrace = Table:removeFtrace(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

WireLink = Table:removeWirelink(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Entity = Table:removeEntity(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Vector4 = Table:removeVector4(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Number = Table:removeNumber(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

RangerData = Table:removeRanger(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Array = Table:removeArray(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Vector = Table:removeVector(String)

Removes the variable at the specified string index, with the specified type, and returns it (8 ops)

Effect = Table:removeEffect(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Angle = Table:removeAngle(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Number = Table:removeNumber(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Table = Table:removeTable(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Vector4 = Table:removeVector4(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Vector = Table:removeVector(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Quaternion = Table:removeQuaternion(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Vector2 = Table:removeVector2(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Stcontrol = Table:removeStcontrol(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Ftrace = Table:removeFtrace(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

String = Table:removeString(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Bone = Table:removeBone(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Matrix4 = Table:removeMatrix4(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

RangerData = Table:removeRanger(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Matrix4 = Table:removeMatrix2(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Tracedata = Table:removeTracedata(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

WireLink = Table:removeWirelink(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Entity = Table:removeEntity(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Array = Table:removeArray(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Matrix = Table:removeMatrix(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

ComplexNumber = Table:removeComplex(Number)

Removes the variable at the specified numerical index, with the specified type, and returns it. All sequential keys will be moved down to fill the gap (8 ops)

Table:pushWirelink(WireLink)

Adds the variable to the end of the table (10 ops)

Table:pushArray(Array)

Adds the variable to the end of the table (10 ops)

Table:pushTracedata(Tracedata)

Adds the variable to the end of the table (10 ops)

Table:pushRanger(RangerData)

Adds the variable to the end of the table (10 ops)

Table:pushTable(Table)

Adds the variable to the end of the table (10 ops)

Table:pushEffect(Effect)

Adds the variable to the end of the table (10 ops)

Table:pushVector4(Vector4)

Adds the variable to the end of the table (10 ops)

Table:pushStcontrol(Stcontrol)

Adds the variable to the end of the table (10 ops)

Table:pushString(String)

Adds the variable to the end of the table (10 ops)

Table:pushComplex(ComplexNumber)

Adds the variable to the end of the table (10 ops)

Table:pushFtrace(Ftrace)

Adds the variable to the end of the table (10 ops)

Table:pushNumber(Number)

Adds the variable to the end of the table (10 ops)

Table:pushMatrix4(Matrix4)

Adds the variable to the end of the table (10 ops)

Table:pushBone(Bone)

Adds the variable to the end of the table (10 ops)

Table:pushEntity(Entity)

Adds the variable to the end of the table (10 ops)

Table:pushVector(Vector)

Adds the variable to the end of the table (10 ops)

Table:pushMatrix2(Matrix4)

Adds the variable to the end of the table (10 ops)

Table:pushQuaternion(Quaternion)

Adds the variable to the end of the table (10 ops)

Table:pushAngle(Angle)

Adds the variable to the end of the table (10 ops)

Table:pushVector2(Vector2)

Adds the variable to the end of the table (10 ops)

Table:pushMatrix(Matrix)

Adds the variable to the end of the table (10 ops)

String = Table:popString()

Removes and returns the last variable (10 ops)

WireLink = Table:popWirelink()

Removes and returns the last variable (10 ops)

Matrix4 = Table:popMatrix2()

Removes and returns the last variable (10 ops)

Matrix4 = Table:popMatrix4()

Removes and returns the last variable (10 ops)

ComplexNumber = Table:popComplex()

Removes and returns the last variable (10 ops)

Bone = Table:popBone()

Removes and returns the last variable (10 ops)

Effect = Table:popEffect()

Removes and returns the last variable (10 ops)

Angle = Table:popAngle()

Removes and returns the last variable (10 ops)

Tracedata = Table:popTracedata()

Removes and returns the last variable (10 ops)

Matrix = Table:popMatrix()

Removes and returns the last variable (10 ops)

Vector = Table:popVector()

Removes and returns the last variable (10 ops)

Quaternion = Table:popQuaternion()

Removes and returns the last variable (10 ops)

Table = Table:popTable()

Removes and returns the last variable (10 ops)

RangerData = Table:popRanger()

Removes and returns the last variable (10 ops)

Entity = Table:popEntity()

Removes and returns the last variable (10 ops)

Vector4 = Table:popVector4()

Removes and returns the last variable (10 ops)

Array = Table:popArray()

Removes and returns the last variable (10 ops)

Number = Table:popNumber()

Removes and returns the last variable (10 ops)

Stcontrol = Table:popStcontrol()

Removes and returns the last variable (10 ops)

Vector2 = Table:popVector2()

Removes and returns the last variable (10 ops)

Ftrace = Table:popFtrace()

Removes and returns the last variable (10 ops)

Table:insertVector2(Number, Vector2)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertQuaternion(Number, Quaternion)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertFtrace(Number, Ftrace)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertBone(Number, Bone)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertMatrix(Number, Matrix)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertVector4(Number, Vector4)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertTracedata(Number, Tracedata)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertMatrix2(Number, Matrix4)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertWirelink(Number, WireLink)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertMatrix4(Number, Matrix4)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertAngle(Number, Angle)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertStcontrol(Number, Stcontrol)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertString(Number, String)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertEffect(Number, Effect)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertNumber(Number, Number)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertVector(Number, Vector)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertComplex(Number, ComplexNumber)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertRanger(Number, RangerData)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertArray(Number, Array)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertTable(Number, Table)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:insertEntity(Number, Entity)

Inserts the variable at the specified position. Moves all other indexes up one step to compensate (10 ops)

Table:unshiftMatrix(Matrix)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftArray(Array)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftVector4(Vector4)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftRanger(RangerData)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftMatrix4(Matrix4)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftEntity(Entity)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftVector(Vector)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftMatrix2(Matrix4)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftNumber(Number)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftStcontrol(Stcontrol)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftFtrace(Ftrace)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftTracedata(Tracedata)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftAngle(Angle)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftTable(Table)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftComplex(ComplexNumber)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftBone(Bone)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftVector2(Vector2)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftWirelink(WireLink)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftString(String)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftEffect(Effect)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)

Table:unshiftQuaternion(Quaternion)

Adds the data to the beginning of the table. Will move all other entries up one step to compensate (10 ops)