So you want to learn lua?
This thread will tell you how to start learning lua (seeing as alot of people have been asking).
FIRST STEPS
Firstly, get this program:
Notepad++ Notepad++ is a great program for writing lua files, as it has syntax highlighting, along with other great features.
Secondly,
set up Notepad++ so it can do more to help you.
Thirdly, i recomend you look at
Jok's Tutorial. Its a bit old, but its great for learning the basics.
After that, i recomend you look at other peoples lua scripts on this forum. (any .lua file is openable in notepad and notepad++)
Finally, Look around the SDK for usefull functions and how to use them (toribash/data/scripts/SDK/).
YOUR SECOND SCRIPT
(Assuming you've made the tutorial script)
So after all that I'm sure your eager to create your laz0r firin' uke dismembering cat strangling script. Well go ahead, see what comes out, experiment, learn. But I suggest you start with something simple (like say, a head launcher)
ERRORS
Chances are, your script you made came up with an error, and you have no clue where to look for more info on the error. Well dont fret, there's a file text file called "stderr.txt" that should show you the line your error occured on, and a basic explanation of what went wrong.
Still stuck on the error? Dont know why its happening or how to fix it? Post
here and ask someone you know is good at lua (though PM or IRC) to help you with it.
HELPFUL DOCUMENTATION
This thread here contains alot of helpful documentation, and links to that documentation.
TIPS
The best way to teach yourself lua, is by looking at other peoples scripts, and seeing how they work. Stuck for ideas? Go check the "
Suggest a script I should make" thread or, ask on IRC for some ideas.
Also, try to
Namespace your scripts. This will make it easier to import into other scripts and such
QUESTIONS ABOUT THIS THREAD?
ask here.
Last edited by Blam; Mar 27, 2008 at 08:37 PM.