Ranking
Original Post
[Tutorial]Lua coding
Tatjam's tutorial on:
Lua Coding
----------------------------------------------------------
WARNING:
This is a WIP, i will update it from time to time!!
----------------------------------------------------------

Ep1: The basics

Ep1



Ep2: Basic Coding:

Ep2


Coming soon:

Hooks
Loops (while, repeat, for)
Statements (If, else, etc...)


Thanks for reading, tell me if there is any error!
Remeber the text is centered!
Last edited by tatjam; Nov 1, 2014 at 03:27 PM.
Thanks, atleast got little bit further in studying Lua, before this i only knew lua is script \o/

Apathetic User
I will keep updating it when i have time, will try to keep it simple.
Will add hooks soon.

Cheers!
Looks good so far. Some suggestions:
  • Show some more examples of how variables can be changed and what they are used for. For example show a simple counter:
    lua code:
    local counter = 0
    echo(counter) -- echoes "0"

    counter = counter + 1
    echo(counter) -- echoes "1"

    counter = counter + 1
    echo(counter) -- echoes "2"
  • Explain some more how tables are used. How to add entries, how indexing works and how to add values.
  • Put every piece of code into [lang="lua"][/lang] tags. Right now there's a lot of code that's just plain text or just in [code] tags which don't use syntax highlighting.
  • Maybe explain how to create a script and name some editors (notepad, notepad++, etc)
Other than that it looks good.
Signature temporarily out of order.
Oh, thanks for the formatting tip, i were just using [Code] tags....
I will add hooks and extend variables and functions.
Cheers!