i understand that lua scripts are compiled
where can i get source code from to see how to modify scripts
i have done a little C++ and lots of vb and VBS before
hi
you can only get the source if the Creator decides to give it out ...
Perhaps I asked the wrong questions ?( !
Once I have created my script how do or what should i use to complie it into a lua file ?
you can create txt file and just change its extension to lua or use ptokaX (script editor)
QuoteOriginally posted by Devongrrl
Perhaps I asked the wrong questions ?( !
Once I have created my script how do or what should i use to complie it into a lua file ?
lua is a scripting language, this means there is no need 2 compile it like c++.
a script is nothing more then a text file.
but there is a small difference between lua and other scripting languages.
normaly scripting languages interpret a script character by character, every space is interpretted but this means it wastes time.
lua compiles the script the moment it loads it, the result gives more speed (it removes all unneeded spaces for example).
but what about those compilers some ppl use you might ask now, those compilers are pre-compilers.
this gives between 25-50% extra speed.
you can find sutch a pre-compiler for lua on my website.
the way 2 use it is simple.
luac -o
plop
plop, isn't it only at first script load it really takes advantage of the precompilers like "luac", hope you understand my point :o)
Typhoon?
QuoteOriginally posted by Typhoon?
plop, isn't it only at first script load it really takes advantage of the precompilers like "luac", hope you understand my point :o)
Typhoon?
yep on loading lua compiles them, using a pre-compiler makes lua's own compiler more efficient.
plop
okay , but still only at first load ? , or when compiled it works faster when running constant and not only at first load ? ...
Typhoon?
QuoteOriginally posted by Typhoon?
okay , but still only at first load ? , or when compiled it works faster when running constant and not only at first load ? ...
Typhoon?
it makes the compiler more efficient so you get a more optimized script.
which runs faster all the time.
plop
hmm
QuoteThe main advantages of precompiling chunks are: faster loading, protecting source code from user changes, and off-line syntax checking.
Pre-compiling does not imply faster execution because in Lua chunks are always compiled into bytecodes before being executed. luac simply allows those bytecodes to be saved in a file for later execution
found this on Luac's man page >>HERE<< (http://www.wra1th.plus.com/lua/v310/luac.html)