PtokaX forum

Development Section => HOW-TO's => Topic started by: Stefan on 24 September, 2005, 14:45:39

Title: need howto for Lua for beginners
Post by: Stefan on 24 September, 2005, 14:45:39
hello

i need to make a presentation about a scripting language. i chose Lua  :D

but i need some things for this:
1) able to script in lua, do i just need notepad, or is there a specific editor for it?

2) make some scripts with lua (put 'hello world' on the screen, and get the answer of 1+2+3+4...+10)

As i want to learn more of lua than just this, i would like to have some suggestions :)

thanks in advance already!

Stefan
Title:
Post by: bastya_elvtars on 24 September, 2005, 15:56:10
Browse the PtokaX Wiki (http://ptxwiki.psycho-chihuahua.net/doku.php) and the LUA-users site (http://lua-users.org/).
Title:
Post by: Mardeg on 24 September, 2005, 20:59:21
In case you didn't browse to it, or got confused by bastya's multiple urls in his sig, here are the editors to use to greatly assist your lua scripting experience:

http://ptxwiki.psycho-chihuahua.net/doku.php/misc/editors

( for #2, choose one that let's you incorporate the help (http://www.plop.nl/lua_tools/Programming_in_Lua.chm) file into it.)
Title:
Post by: bastya_elvtars on 25 September, 2005, 12:14:04
With SciTE, try this (http://www.geocities.com/keinhong/scite/lua5api.zip) .
Title:
Post by: Stefan on 25 September, 2005, 14:18:01
thanks a lot :)

i tried my little script on it.
with this script i get the answer of 1+2+3..+9+10 :)

Quotea=0

a=a+i

print(a)

is there any way in PSPad (2nd editor from above) to check if the answer (must be 52) is correct?
Title:
Post by: Dessamator on 25 September, 2005, 16:18:17
Nop,  doubt it , as far as i know its not possible, a pad is a pad and nothing more .
Title:
Post by: bastya_elvtars on 25 September, 2005, 22:03:40
I think he meant debugging. As such, SciTE or LUAEdit (which is not on the wiki yet) are recommended, along with the print function.