[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: creating and evaluating functions -- Lua 4.0 vs Lua 5.0
- From: "marcus.cf" <marcus.cf@...>
- Date: Wed, 18 Jun 2003 16:22:50 -0300
lua_load is a very generic function to
load code (you execute it afterwards
with lua_call or lua_pcall). Try
luaL_loadfile and luaL_loadbuffer.
But, if you prefer, lua_dostring still
exists, it is declared in lauxlib.h
(lauxlib.pas, for Delphi).
Are you using THLua or doing your own
"header files?". I was converting the
latest THLua (Lua 5.0 w0) to Lua 5.0
final, in case you are interested.
> Hi All,
> as a matter of fact, I am using Lua 4.0 code with Delphi where this code
> runs fine with Lua4:
> k := lua_dostring(L,LuaCode);
> where k is an integer and LuaCode is PChar (char *LuaCode)
> L = PLua_State (Lua_State *L);
> With Lua5 this code doesn't run anymore. I have tried the function lua_load
> lua_load: function(L: Plua_State; reader: lua_Chunkreader; data: Pointer;
> const chunkname: PChar): Integer; cdecl;
> I have tried many parameters but I can't find the right ones to put in it.
> k := lua_load(L, ...);
> In this case what are "reader", "lua_Chunkreader", "data", "chunkname"
Seleção de Softwares UOL.
10 softwares escolhidos pelo UOL para você e sua família.