How to learn LUA
Hey guys ! I would like to learn LUA . I have 0 knowledge x). How do you think I could learn this ? Thanks you ;D
@ Lapin: https://gyazo.com/0e3770567e1cb51a50d71da2f2345f4c Instead of just disagreeing and being utterly useless. Why can't you at least give your thoughts? OT: Here is a great place to start. https://wiki.garrysmod.com/page/Beginner_Tutorial_Intro It will run you through all the basics on glua, assuming you want to learn that since you're posting on a forum more or less dedicated to Garry's Mod.
After you've seen the tutorial, try to set yourself small goals. Something like creating a HUD, simple vgui screen or a very small gamemode ( like gungame ). Overall try to make coding fun ( test creations with friends ), code because you want to, not because you have to.
Okay I will consider it ! Thanks a lot :D
It's Lua.
Learn basic coding syntax first, so like a much simpler language like Java or something then incorporate the fundamentals from that into Lua.
Basic coding syntax?
Syntax isn't the hard part at all, I also would not call Java simpler.. In GMod things are going to be higher level anyway due to the functions already in place, hooks and more.
Not sure I really agree with your advice.
ByKylo Ren kills Han Soloat 14th of December 2016 16:19:19
Learn basic coding syntax first, so like a much simpler language like Java or something then incorporate the fundamentals from that into Lua.
I don't know any scripting language that would be as 'loose' in terms of syntax as Lua.
You can do semicolons or not, you can use parenthesis or drop them completely, you can use different styles for table definition or call to value (and many more).
Lua is by far the most enjoyable language I've ever had opportunity to work with.
By๐at 15th of December 2016 15:43:27
I don't know any scripting language that would be as 'loose' in terms of syntax as Lua.You can do semicolons or not, you can use parenthesis or drop them completely, you can use different styles for table definition or call to value (and many more).Lua is by far the most enjoyable language I've ever had opportunity to work with.
I agree, it's so 'flexible' if thats the right terminology for it. It's pretty forgiving for a language, like you said; you can decide whether or not to add semicolons etc. Lua doesn't care lmao
I got to learn the basics and some more advanced things using Code Blue his tutorials on YouTube.
ByJean Foret [FT]at 12th of December 2016 19:12:51
Hey guys !I would like to learn LUA . I have 0 knowledge x).How do you think I could learn this ?Thanks you ;D
Ask someone to teach you or watch tons of youtube videos. If you want to do it your self download some scripts off the interent and here, edit them. Then when you know how to do that. Contact someone and learn the basics. Your, welcome.
Thought I'd summarise :)
Lua is a procedual, object oriented language.
Methods of learning:
The Wiki: Gmod Wiki (Fairly good place to learn, I would recommend using this before asking how to do stuff).
YouTube: Code Blue, Erigitic (Couple of decent tutorial series, there's more but you can find them).
Reverse Engineering: You can download scripts and then look at the code. I would like to mention that the developer may have bad coding practices (not saying I'm an expert), code might not be efficient so be careful when looking at other scripts. You also dont want to steal anything.
Of course you could hire somebody to teach you. The methods above are free and will, overtime and with effort put in, teach you.
ByMunchat 15th of December 2016 21:44:27
Thought I'd summarise :)Lua is a procedual, object oriented language, meaning it works from the top down. To simplify, if you wanted to print a variable at the top of the file but declared the variable at the bottom, the program wouldnt be able to print because it doesnt know the variable yet because it's printing before declaring.
Far from true. You can define a function above variable you want to use and it won't pop an error.
Not to mention you are forgetting that undefined variables are just 'nil' and some functions accept nil as an argument - functions such as print.
@edit - it's really just 'scopes'.
learning without motivation is the worst you'll never learn anything, find a language you like a lot, i thought I liked lua then realized I liked web-type languages way better and learned them faster than I did the languages i didn't like.
it's either just a me thing or 90% of the population thing, nothing is ever efficiently done without motivation tbh.
By๐at 15th of December 2016 22:05:08
Far from true.You can define a function above variable you want to use and it won't pop an error.Not to mention you are forgetting that undefined variables are just 'nil' and some functions accept nil as an argument - functions such as print.@edit - it's really just 'scopes'.
My bad and thanks for the correction. Removed that section lol. Havent done the language in few years
ByMunchat 15th of December 2016 21:44:27
Thought I'd summarise :)Lua is a procedual, object oriented language.Methods of learning:The Wiki:Gmod Wiki(Fairly good place to learn, I would recommend using this before asking how to do stuff).YouTube:Code Blue,Erigitic(Couple of decent tutorial series, there's more but you can find them).Reverse Engineering:You can download scripts and then look at the code. I would like to mention that the developer may have bad coding practices (not saying I'm an expert), code might not be efficient so be careful when looking at other scripts. You also dont want to steal anything.Of course you could hire somebody to teach you. The methods above are free and will, overtime and with effort put in, teach you.
I wouldn't use gmod wiki
BySir Smurfzalotat 16th of December 2016 13:14:36
I wouldn't use gmod wiki
what. It's one of the best resources for any programming language I've ever used personally. It's all so easily searchable in one place
BySir Smurfzalotat 16th of December 2016 13:14:36
I wouldn't use gmod wiki
Oh yes let's not use the single largest source dedicated to GLua.