Tao.Lua SDK Documentation

Lua.lua_setlocal Method 

Sets the value of a local variable of a given activation record

[Visual Basic]
Public Shared Function lua_setlocal( _
   ByVal L As IntPtr, _
   ByVal ar As lua_Debug, _
   ByVal n As Integer _
) As String
[C#]
public static string lua_setlocal(
   IntPtr L,
   lua_Debug ar,
   int n
);

Parameters

L
ar
Parameters ar and n are as in lua_getlocal (see lua_getlocal). lua_setlocal assigns the value at the top of the stack to the variable and returns its name. It also pops the value from the stack.
n
Parameters ar and n are as in lua_getlocal (see lua_getlocal). lua_setlocal assigns the value at the top of the stack to the variable and returns its name. It also pops the value from the stack.

Return Value

Returns NULL (and pops nothing) when the index is greater than the number of active local variables.

See Also

Lua Class | Tao.Lua Namespace