No categories assigned
LUA:GetVariableValue
- Last edited 9 years ago by I need to Update My Profile
LUA Functions: GetVariableValue()
Gets the value of the given variable
Syntax
var = GetVariableValue(param1)
Parameters
- Required - param1 (string)
- param1 is the name of the variable
Usage
function hailed(NPC, Spawn)
Say(NPC, "Level cap is set to " .. GetVariableValue("level_cap"))
end
The NPC will respond with the level cap for the server
Notes
Returns a string
This gets the values for variables in the `variables` table.
Also, if you want to return values set by SetServerVariable(), make sure to include the 'lua_' prefix, slightly different from GetServerVariable().