Author Topic: Learning Lua  (Read 4568 times)

0 Members and 1 Guest are viewing this topic.

Offline Janjakob2000

  • Jr. Member
  • **
  • Posts: 65
  • Karma: 0
Learning Lua
« on: July 19, 2015, 03:06:11 AM »
So about 1 month ago, I got into lua coding, and learned myself the basics of it, but there's still enough out there to learn from the lua language, and I just wanted to ask, which is the best way to learn lua, the most easiest, but powerful language?

What I've tryed so far:
Look into people's addons, and see how they have done it, and learn from it.
Wikis.
Asking around, especially on these forums.
Looked at the thread of Megiddo for lua resources to learn from.

But, are there any other ways of learning lua?
I bet there are, but can't really think of one, and I'd love to get a hand of this language, so was wondering if you developers/coders out there mind helping me out a bit?

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: Learning Lua
« Reply #1 on: July 19, 2015, 03:12:44 PM »
Wouldn't say Lua is the easiest language to learn. It all depends on the developer though.

Have you read this article about the Lua fundamentals on the Gmod wiki? If you're more of a visual learner, see if you can find some video tutorials on basic Lua.

You can learn a lot about a language just by experimenting with it. There's a bunch of code examples on the Gmod wiki you can play with.

Since you said you already know the basics, I encourage you to write some simple addons using the things you've learned so far. Use the Garry's Mod Wiki as a reference.

Here are some ideas:
- Console command that prints the nicknames of all players
- Kill every player that uses the words "kill", "dead" or "death" in a sentence
- Ulx command that tells you if any of your friends are also playing on that server
- ... (follow your curiosity)

Edit: Looking at your posts, I can see that's what you're already doing. Learning a programming language takes time. Experiment and play with them.
« Last Edit: July 19, 2015, 03:41:16 PM by Timmy »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given