Forum

> > CS2D > General > Creating Lua Script
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Creating Lua Script

5 replies
To the start Previous 1 Next To the start

old Re: Creating Lua Script

DannyDeth
User Off Offline

Quote
It isn't a click and decided method, i can tell you that! You have to code it using the Lua ( Duh! ) programming/scripting language. You save it in a .lua file and then add in "server.lua" dofile("my_lua_script_name.lua")
That should get it working.

However, 'making' a script is very wrong usage of the english language. Correctly you would 'code' it. Lua is a fairly easy language to learn, there are no things that define the end of a piece of code like in C/C++'s ";". It's loops are simple to use. However you use the word 'end' instead of the traditional { and }. So Lua all together is not exactly a monster to try swallow.
There are numerous tutorials, but thee only real way to learn is to "code a little, read a lot, code a little, read a lot, code quite a bit, realise you just failed, read a lot."

old Re: Creating Lua Script

Banaan
User Off Offline

Quote
Lua is seriously one of the easiest languages to learn (if you have never coded anything before) because of the simple functions, clear structure (if ... then ... end) and therefore very little things that can go wrong.

Advise: use Notepad++ for its Lua syntax highlighting - really useful.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview