No categories assigned

LUA:GetVariableValue

Revision as of 19:30, 11 September 2013 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: GetVariableValue() = Gets the value of the given variable ==== Syntax ==== var = GetVariableValue(param1) ==== Parameters ==== ; Required - ''param1'' (strin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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