How can create table in lua?
I want some method by it I create.
For example :
Code: Select all
s={}
function s.lua()
return 1
end
function s.pb()
return 0
end
And more ...

Code: Select all
s={}
function s.lua()
return 1
end
function s.pb()
return 0
end
And more ...
Code: Select all
ProcedureC MsgBox_Lua(L.l)
If lua_type(L, 1) = #LUA_TSTRING
Protected param1.s = PeekS(luaL_checkstring(L,1))
Else
lua_myError(L,"Wrong type of parameter 1. String expected!")
EndIf
If lua_type(L, 2) = #LUA_TSTRING
Protected param2.s = PeekS(luaL_checkstring(L,2))
Else
lua_myError(L,"Wrong type of parameter 2. String expected!")
EndIf
If lua_type(L, 3) = #LUA_TNUMBER
Protected param3.l=luaL_checknumber(L,3)
Else
lua_myError(L,"Wrong type of parameter 3. Number expected!")
EndIf
lua_pushnumber(L,MessageBox_(hWndMain,param1,param2,param3))
ProcedureReturn 1
EndProcedure
lua_register(L,"MessageBox", @MsgBox_lua())
Code: Select all
lua.MessageBox("","",0);