newbie question about lua scripting
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

newbie question about lua scripting

Started by Devongrrl, 12 December, 2004, 14:54:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devongrrl

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

??????Hawk??????

hi  

you can only get the source  if the  Creator decides to give it out  ...

Devongrrl

#2
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 ?


enema

you can create txt file and just change its extension to lua or use ptokaX (script editor)

plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

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?



plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Typhoon

okay , but still only at first load ? , or when compiled it works faster when running constant and not only at first load  ? ...


Typhoon?



plop

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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

VidFamne

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<<

SMF spam blocked by CleanTalk