Skip to content

Instantly share code, notes, and snippets.

@Necktrox
Necktrox / FormattedDebugFunction.lua
Last active May 4, 2017 06:17
Debug function for formatted output with variable names
DEBUG_MODE = true
DEBUG_PIPE = print
SHOW_ADDRESS = true
MTA_COMPATIBLE = false
local function getVariableValue(level, variable)
local index, name, value, skip = 1
-- Check if variable name contains a dot (table access)
if variable:find("%.") ~= nil then