Curiosity
So I'd like to consider myself an entry level lua scrub, most of my time trying to create scripts is filled with anxiety, pulling hair out, and holding myself back from throwing the computer out the window. Of course I am self-taught so far, so I'm guessing that makes it a little more difficult to learn without guidance.
So I'm curious, how did you learn lua? Any tips or advice you can give me to step it up? Thanks in advance.
To be honest, there are no tricks, not for Lua, nor for any other programming language, there are no "special" or secret videos that you can watch and instantly get good at it, you just gotta practice, and be sure to understand what you're doing, not just copy-paste code from tutorials or stack overflow.
ByAlek ☕at 11th of March 2017 01:54:38
To be honest, there are no tricks, not for Lua, nor for any other programming language, there are no "special" or secret videos that you can watch and instantly get good at it, you just gotta practice, and be sure to understand what you're doing, not just copy-paste code from tutorials or stack overflow.
I'm not looking for an easy fix, just some sort of insight into how others have developed their lua skills. I employ two developers for my current server, but I'd like to learn more about lua so I can help them out.
if ya can't learn the language easily then it's probably not the best idea to force yourself into it especially starting try and find something that's enjoyable to program, usually people wanna code lua when they're good at something else so they just limit themselves
think of idea e.g drug dealer npc
'hmm how did they make this window pop up??' --> find an addon that has a similar concept (panel opens up when u press e)
rinse and repeat
Good ideas, I'll give em a shot. One of my devs suggested I re-type all of DarkRP a few times to get familiar. It's gonna suck, but it should help. Thanks guys.
What helped a lot for me is writing down what you actually want on paper in every single detail. Then you read over it again for any errors or change of order. After that you will have to learn how to translate what you just wrote down with (G)Lua. Just open up google and search on the Garry's Mod wiki to find specific functions and hooks that you are looking for. Then you start writing it bit by bit, you may skip the things you don't understand yet and further investigate that later. When you wrote down everything you know or were able to find you start checking if the code is logically setup. Maybe you are using some calculations a lot of time and could just make a function for it. Then last of all you start testing and writing the final code.
Sorry if this came out a bit confusing, but that is basically what I (try) to do.
never say (G)Lua thx