Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Integrate Lua

Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
That's a strange answer. That ain't even an answer.. What is everything? How can you compare any sort of ... speed with LUA and C++? Do you know what binding LUA to C++ is?

In this concept, as far as I know, there's no single difference at "any speed" compared with C++. You're using LUA to solve problems or create functions you cannot do in C++, in this case. Usually you're doing this because of a lack of knowledge in C++. LUA is easier than C++ to understand and write. Programming in LUA has shorter terms as well, which saves some time when writing a big piece of code.

c++ calculates and work faster than lua



Hey @Daneos what i have to download? In one the zip have SRC in there files .h and .c what i have to download?



Never mind, at the end is the download xD



Why this doesn't work??

luaL_dofile(L, "LUA\test.lua");

and this yes

luaL_dofile(L, "test.lua");

??

Why you dont use current LUA wrapper from the source? XD

how I run all scripts and register functions
printf("==== LOAD LUA FILES ==== \n"); app.lua = new CNtlLuaState;
app.lua->RunAllScripts();
app.lua->LoadAllFunctions();



Ok I can return values from lua to server now.
 
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
I know. I was kinda surprised when I read the con/pro for lua in c++. But benchmark proved that c++ is faster.

Anyway Im done. I can call from lua c++ functions and can call lua functions from c++
 
Elite Diviner
Joined
May 26, 2014
Messages
482
Reaction score
32
I have to add something to the project?

To do this

Code:
printf("==== LOAD LUA FILES ==== \n");    app.lua = new CNtlLuaState;
app.lua->RunAllScripts();
app.lua->LoadAllFunctions();

Like

NtlLuaState.cpp and .h

And why you don't use app->lua? You use app.lua
 
Last edited:
Dbo Dev
Joined
Sep 19, 2009
Messages
921
Reaction score
191
o_O Because I had to? XD Anyway you need some basic c++ experience to do this + much google. Also you have to write your own lua wrapper because NtlLuaState wont work.
 
Back
Top