PtokaX forum

Development Section => Your Developing Problems => Topic started by: Tuben on 02 November, 2003, 00:12:32

Title: Compile.
Post by: Tuben on 02 November, 2003, 00:12:32
Can somone tell me hove too Compile lua scripting files ?

Title:
Post by: BlazeXxX on 02 November, 2003, 03:03:27
Compile in the sense? You mean changing to LUA format? like .lua ?
Title:
Post by: klownietklowniet on 02 November, 2003, 03:54:59
Get Luac.exe. It's the Lua compiler. Syntax is pretty standard, but you can execute it with no options to get the list of parameters...
Title:
Post by: Tuben on 02 November, 2003, 10:46:48
And hove do i use it ??
Title:
Post by: pHaTTy on 02 November, 2003, 11:16:30
open a dos prompt cd to the directry where you have luac.ex and ur script.lua , then in the prompt type

luac.exe script.lua    <<< this is the simple way of doing it, then it will make a file named iforgotname.out, lol

then there ya go ;)
Title:
Post by: klownietklowniet on 02 November, 2003, 11:32:29
use with -o as a parameter and then the filename you want like so:

Luac.exe -o compiledscript.lua sourcescript.lua

This will create a file calles "compiledscript.lua" which is the compiled version of sourcescript.lua, which will be your script.

You can just run Luac.exe with no option to get the list of possible parameters... ;-)
Title:
Post by: Tuben on 02 November, 2003, 14:23:46
"Edit" Fu** cant fins luac.exe.

Do somone have the ul ?

Ok..Trying that ;)
Title:
Post by: klownietklowniet on 02 November, 2003, 15:27:57
Easiest way is to download GS and rip it from there... ;-)

Else you can google it...
Title:
Post by: VERMiN on 03 November, 2003, 17:52:32
You can also use -s to strip debug info and make the script smaller.

luac -s -o MyScript.compiled MyScript.lua
Title:
Post by: [T-G-T]M@sto on 03 November, 2003, 20:26:38
QuoteOriginally posted by Tuben
"Edit" Fu** cant fins luac.exe.

Do somone have the ul ?

Ok..Trying that ;)
Try here http://www.lua.org/download.html