Variables & types

Variables are used to store data that can have different types, they can be numbers, text or arrays.

How do they work

Neurox variables & types are similar to LuaU's, but some of them are currently not readable. Variables are stored in a LuaU table called system_variables.

Neurox module script snippet
local neurox = {}

neurox.system_variables = {}

return neurox

If you create a variable, it will be stored in that table :

DEFINE NEUROX
SET a = 0

The table will be updated like this, storing the variable name, value and type :

Table with variable data
neurox.system_variables = {
    ["a"] = {
        ["varData"] = 0,
        ["varType"] = "int"
     }
}

Usage & examples

Here are the 4 types included in Neurox :

  • String, for instance "hello world"

  • Integer, for instance 42

  • Float, for instance 1.5

  • Boolean, for instance True or False

Example :

Set a variable with the keyword SET, followed by an equal symbol and its value

DEFINE NEUROX
SET strValue = "hello world"
SET intValue = 42
SET floatValue = 1.5
SET booleanValue = True

You can also set a new variable with another's value

DEFINE NEUROX
SET strValue = "hello world"
SET hello = strValue

hello variable value will be the same as strValue, "hello world"

Forbidden variables names

Some variable names cannot be used because they are used by the system. They all have a specific usage. While being editable, their name can't be used for another variable.

WinDir, WinBootDir, HostWinBootDrv, WinName, WinVersion, BuildDate, theme, wallpaper

You will instantly get an error if you try to create variables with forbidden names.

Last updated