Where do I start my LUA adventure?

I know this question as been asked many of times throughout this forum and others, but none of them have answered my question. I am looking for a place to begin and start building my knowledge of the language lua. I am looking for books, GOOD instructive wiki’s, The way your guys learned lua. In general just a bunch of possible ways to learn lua. I tried solely using the gmod wiki but found myself striving for more knowledge after the little developer intro thing was over, (small little three pages.) I then browsed what hooks were etc, online and just tried to build my understandment of lua. In the end I couldn’t really find a great start and started analyzing actuall addons which lead to me coming here for an actuall beginning of sorts, or atleast to grasp different terms as a lot are left unexplained.

I’d suggest reading PIL(Programming in Lua) as it’s free and aimed at Lua 5.0 though still relevant for Lua 5.1. If you want to you can buy the second edition which is aimed at Lua 5.1, although I’d say you don’t need to as the one aimed at Lua 5.0 is fine.

Alongside one of those the manual is good reference.

Lua 5.1 is about the closest to Gmod you can get as Gmod runs on LuaJIT 2.0.3, only big difference afaik is the GOTO keyword which you can read about in the Lua 5.2 manual.

After you understand the language then I’d suggest looking over the Gmod github. It contains the source for many of the functions in Gmod, you can also get to them directly from the functions by looking at the wiki.

Of course I’d suggest testing and messing around with different things throughout all of them, also looking at other peoples scripts.

Hope that helps

Take a look at codeblue’s tuts. It has a great intro into lua, and then jumps right into glua. https://www.youtube.com/channel/UCFpuE-Qjn4EWqX-VJ_l7pbw/playlists

It’s what I have used thus far, can be confusing at times with no prior programming knowledge but if you rewatch and practice you will get it.

Same I would also like to learn more advanced lua but the lua documents are way too complicated xD

Learning by modifying existing code can be a good way to do it. Although I had some coding knowledge I started out with small projects for TTT (Like creating a system to change player scoreboard name colours on the fly). Having a purpose/something you are passionate about helps because your projects just become things that you want to implement/need to be fixed.

It depends on your base knowledge tbh. If you aren’t familiar enough with the basic building blocks and how they fit together you will probably struggle to understand or write any working glua.

I would recommend https://projecteuler.net, it has increasingly difficult maths questions that you need to write code to solve. Being able to do the first few of those should mean that you have a good grip on the basics.

Its easy to fall into the trap of dreaming too big when you are inexperienced and getting flustered instantly, you need small projects that you can complete then from there think of ways to improve and build upon them/making them more complex. Google and the wiki are your best friend for finding the functions you need on the wiki and examples of similar things people have written before.