Skip to content

Collections

array<string> names = {"Kartz", "Player1"};
local names: {string} = { "Kartz", "Player1" }

vector<T>, LuaArray<T>, and span<T> mean the same thing.

dictionary<string, int> stats = {
{"Coins", 100},
{"Gems", 50}
};
local stats: { [string]: number } = { Coins = 100, Gems = 50 }

Table keys in expressions use . (stats.Coins). Instance properties use the same ..

These tables are what Fusion and Vide property lists look like: string keys to values. See Fusion and Vide.

Next: Structs and methods.