Jump to content

Lua


Azu

Recommended Posts

Posted

You don't need to learn C++ at all. I learnt Lua just by looking at scripts that people had made, and the wiki documentation that we created.

Posted

Yep that's rely easy to learn!And im sure what someone will make example script like

SWEP.Primary.ClipSize = 10 //And here go description what this comand do!

This would be wery usefull for beginers!

Posted
Will I need to know ANY C/C++ to learn Lua? Just enough to use it for MTA?

To code in LUA you will need basic programming knowledge, so knowing some other language like C++ will definately help. If you don't know one, then you should probably just start with LUA.

Here is some documentation, you should know sections 2-5 at the very least: http://www.lua.org/pil/index.html

Posted
Hello world in LUA:

# Hello World in lua

print "Hello world"

lol, that looks easy (source)

I know pretty much about PHP, will that help?

I bet it will since you probably know about functions and control structures.

'print' has no use in MTA though.

Posted

Hmm ye you need somthink where you can check...like mta dm .... lol

Or you can get GMOD 10 and script there.For example my 1 LUA code was gun for GMOD! After that i maked more guns then i maked a gamemode.

Anyway if you are beginner you should not make a new script but edit already maked script.

Posted

On the C++ note, Lua is FAR simpler than C++ as a language, for 1 thing, Lua isn't really a "typed" language, like PHP, which makes things a lot easier for people with no experience.

There are Lua tutorials all over the internet, just google for it. I had to learn it when i was first adding the scripting engine to the server so i could test if it was working properly, and it took me no time at all to get used to it.

Posted

Yeah, Lua has been the first language ive ever learnt and i have become really fluent in it.

As Oli said its a really "typed" language. When you read the code it almost sounds like a sentence (at least i find it does).

Posted
Yeah, Lua has been the first language ive ever learnt

How do you know english then? :o:shock:

lol okay smart ass, i learnt English after learning Lua. i have a Lua -> english translater which is how i learnt.

Posted
Yeah, Lua has been the first language ive ever learnt

How do you know english then? :o:shock:

lol okay smart ass, i learnt English after learning Lua. i have a Lua -> english translater which is how i learnt.

:lol:

Posted

can smo tell me how i can learn LUA ^^

It sounds great and i want to learn it ;)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...