Scripting/Server/Classes/HashTable
A named dictionary that lives for the lifetime of the script VM, handy for sharing data between scripts or saving settings to disk. Values may be integers, floats or strings.
Methods and functions
- HashTable – Creates (or returns the existing) table.
- ht.Add / ht.Get / ht.Del – Set / read (returns null if missing) / remove.
- ht.Inc / ht.Dec – Add or subtract 1 from an integer value (missing keys start at 0).
- ht.Save – Writes key=value lines to a file.
- HashTableClass.Load – Loads a table from a key=value file; the table is named after the file (without extension).
- ht.Close – Frees the table.
Categories: Server classes