Jump to content

How to compile Lua?


PHANTASM

Recommended Posts

I am interested in learning about making lua modules. I was wondering if anyone was willing to share any tips on how to compile lua code into the actual dll module. I have MSVB and I use it occasionally for compiling project files and dlls based on VB, but it gives me compile errors if I try to compile lua with it. I don't have a C++ compiler or a lua compiler.

 

I have read the lua site and downloaded a lot of stuff from it but have not found an actual application I could use. The lua website has what they call "lua compilers" but these are just code (C++ I think, but not sure) to be compiled to make a lua compiler. I'm not sure how to compile the compiler. Noob question to some of you guys I know lol.

 

I would like to just get an appilcation to drop code in and hit a button and have a dll. If anyone has one or can point me in the direction that would be great. Yes I know how to use google and I have searched for hours already.

 

Thanks.

Link to comment
Share on other sites

  • Administrators

LUA scripts doesn't need compiler or compilation. It's more like scripting language.

 

Are you asking to learn LUA scripts ? Just little confused.

Link to comment
Share on other sites

LUA scripts doesn't need compiler or compilation. It's more like scripting language.

 

Are you asking to learn LUA scripts ? Just little confused.

 

I see lua scripts as "xyz.lua" on etpub forums and I wanted to use them. I can open them up and edit them in Notepad like any other file. Lua is just like C, so it's not that hard to figure out. But I also see compiled lua (as in lua5.1.dll from Silent mod). So I am/was under the impression that I needed to make them into a compiled .dll file for these to work. You have to compile C, so I thought I had to compile lua too. But I could not find a compiler specific for lua.

 

So there is no such thing as a lua compiler? OK, that explains why I can't find one.

 

Why do they even name a lua script as a .dll then? That just confuses people like me (yeah not hard I know).

 

Thanks for the advice.

Link to comment
Share on other sites

  • Administrators

In order to run LUA on server you need lua5.1.dll All the lua scripts come with .lua extension.

 

For LUA scripting: http://wolfwiki.anime.net/index.php/Lua_Tutorials

Link to comment
Share on other sites

Ok here's my next n00b question.

 

I found a script called stenwar.lua on the etpub forum that I wanted to try out. Already written, should be easy. I have Silent 0.3.3 running. I saved stenwar.lua as a text file with the ".lua" extension in the top level folder (next to ETDED.exe) and in both the etmain and in silent folders. Then in the silent.cfg I have these cvars:

 

set lua_modules "stenwar.lua"

set lua_allowedModules "53e10356e27ab289b2a5e39bd9125da981515d03"

 

I made the SHA-1 sig from here:

 

http://hash.online-c.../sha1-generator

 

I copied the stenwar.lua code from the etpub forum and did not modify it in any way. Just wanted to learn how to do it. This is why I thought I had to compile it before. So, what am I missing...

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.