Lua functions

SetServerVariable

Registered in this checkout as EQ2Emu_lua_SetServerVariable; implementation found at WorldServer/Lua/LuaFunctions.cpp:11397.

Historical signature: SetServerVariable(name, value, comment)

Parameter and behavior details in the historical explanation are under review against the current implementation.

Function: SetServerVariable(name, value, comment)

Description: Sets the lua_-prefixed server variable for name. The name and value must be nonempty. New variables use the supplied comment; updates preserve an existing comment. The admitted values are copied for persistence.

Parameters:

  • name (string) - Variable name without the lua_ prefix.
  • value (string) - Nonempty value to store.
  • comment (string, optional) - Comment for a new variable; defaults to an empty string.

Returns: None. Invalid empty names or values log an error and leave storage unchanged.

Checked example

No checked example is published for this function yet. No active script call with the current C++ argument count was found.

Current registration: WorldServer/Lua/LuaInterface.cpp. Historical explanation: EQ2Emu Lua documentation.