Requsting advice

I’ve been trying to learn Lua, but I just can’t seem to get the hang of it. :frowning:
I can make some really simple things, like a Swep that shoots sawblades. I can make sense of some parts of scripts, but a majority of the time I’m lost. I’ve been trying to learn for a good month or two now.

There aren’t any good sources to learn Lua really, the Gmod wiki helped me a little. (Where I learned to make my Sweps)

So I was wondering if any of you Lua kings could give me some good advice on learning Lua. Possibly point me in the direction of some nice tutorials.
Any help would be really appreciated, thanks.

Did you try actually doing the things gmod lua wiki was teaching you how to do (other then sweps)? I’m by no means a lua king but I’m learning and wiki has been the best place, I just follow what they are teaching me to do and I pretty much remember what they teached me during that lesson.

http://luasearch.overvprojects.nl/

:v:

Wow. So now I know not to just skim over things in the wiki. I’ve been looking at it for just under an hour and already learning.

Script I just wrote up succesfully. :v:
[Lua]
myCash = 250
Deagle = “Desert Eagle”
Deaglep = 50
AK = “AK-47”
AKp = 75
DE = “Dual-Elites”
DEp = 130
NO = “Sorry, you don’t have enough cash!”
OK = “It looks like you have enough cash!”
Msg(“You have $”…myCash…" in your wallet
“)
Msg(Deagle…” costs $50
")
Msg("Would you like to buy a “…Deagle…” for 50? ") if myCash >= Deaglep then Msg(OK.." ") myCash = myCash - Deaglep Msg(Deagle.." purchased. ") else Msg(NO.." ") Msg("You need “…Deaglep - myCash…” more dollars.
“)
end
Msg(“You have $”…myCash…” in your wallet
“)
Msg(AK…” costs $75
")
Msg("Would you like to buy an “…AK…” for 75? ") if myCash >= AKp then Msg(OK.." ") myCash = myCash - AKp Msg(AK.." purchased. ") else Msg(NO.." ") Msg("You need “…AKp - myCash…” more dollars.
“)
end
Msg(“You have $”…myCash…” in your wallet
“)
Msg(DE…” cost $130
")
Msg("Would you like to buy “…DE…” for 130? ") if myCash >= DEp then Msg(OK.." ") myCash = myCash - DEp Msg(DE.." purchased. ") else Msg(NO.." ") Msg("You need “…DEp - myCash…” more dollars.
")
end
[/Lua]
Doesn’t really do anything but print stuff in console.
But pretty good for a Lua newb like me! Haha
Thanks. :slight_smile:

… what were you doing on the wiki before? o.O

Just glancing at tutorials and smugly saying “Know it” in my head. :smug: Haha
Found out you NEED to code it to learn.

Lol I couldn’t tell if you were being sarcastic, XD, but actually doing the stuff they give you has helped a lot, I’m guessing lol?

Think of some small little thing you want to make, like double jumping. Then look up scripts that have double jumping and try to figure out how it works, ask for help in the newbie questions section if you get stuck. That’s how I learned.

Will do. :slight_smile: