I need a LUA tutor

Ok so I’ve tried learning lua by myself and haven’t had much luck I’ve tried reading lua books but I can’t learn anything so this is my last hope, I need a person who knows a lot about lua and can teach me mostly everything so please reply I’ll do anything to get a tutor.

anything?!?!?

[editline]02:44PM[/editline]

and you can add me if you want help.

Anything you say

$50 an hour

Bit of a dodgy offer, what if it isn’t Lua assistance he requires? If you get my drift…

Anyway, puns aside. He already has someone helping him I heard.

I used to love helping people with that stuff but the problem is they automatically think they’re your new best friend…

Ok Seth you guys may know him is helping me if anyone thinks you are better than him or can beat a price of $5 a lesson then tell me.

Four dollars :o

:open_mouth:

I will go to $3 but I think you could learn alot of lessons in an hour so this is not going to be cheep

King Flawless, do you even understand Lua?

I coul teach you for free, but my time zone is GMT +2. Add me on Steam and appear there within three hours and I can. :smiley:

Whats LUA?

epic facepalm

Well, I need a lua tutor too, but I dont know if I need to make a new topic or just post it here.
If you would like to help me, add stany10 or tell me your steam-name, ty.

The wiki might not be perfect, but surely it is good enough to learn lua for Garry’s Mod, I learnt primarily from the wiki and trial and error.

You don’t need a tutor…

Holy shit we can just charge into the forum and request a tutor and people will help for free?
I’d lost faith in humankind until I saw this thread.
Thanks for the pick me up.

I definitely need a tutor. I want to learn it…

[editline]06:39PM[/editline]

I can’t understand wiki much.

Trial and error is your friend, just like google.

You MUST have finished a math level of Algebra 1 or higher. You’d usually learn this in 7th grade or 8th grade.

Lua Jargon:
function - an action, verb.
call - to run, execute. (to call a function)
argument - variables sent to the function.
comment - something that is not ran in the code, usually thoughts from the coder or lines that were removed.
chunk - a block of text that Lua executes. Anything inside functions are chunks.
integer - number
float - number with decimals.
string - a sentence or block of text. Should always be in quotes (" STRING ") or double-brackets ([[ STRING ]])
table - an array of random variables. You can set an index to redirect to a value. The index and value can be any type of variable. You can get a value from the index, but you can’t get the index from the value.
variable - a redirection of a number, table, or string. Like in the algebraic sense, but contains not only numbers but tables, strings and functions.
local - a variable that is set only inside a chunk.
global - a variable that is set inside the chunk and outside. Can be accessed by anything and any one.
client - a lua file ran on the side that draws the 3D objects and HUD.
server - a lua file ran on the side that simulates physics and moves players.
shared (confusing!) - a lua file that is ran on both sides, but counts as two files ran separate on both sides. the variables and functions are separate for client and server. Hooking to HUDPaint (a client function) doesn’t do anything for the server. Calling HUDPaint might crash for the server because it only exists in the client.

Functions in garrys mod are already created to modify the source engine. The function “Msg” was created to message the player in the Console. You can call this function like so:
[lua]Msg()[/lua]

But this does nothing, since there were no arguments sent through the function.
Garry’s Mod was designed so that the first argument of Msg would accept a string. Now lets have it message us “Hello World!” by setting the first argument to “Hello World!”
[lua]Msg(“Hello World!”)[/lua]
The parenthesis helps us identify that Msg is a function and anything in between the parenthesis are functions.

The wiki is a great source to find functions, what they do, and what arguments they take.

I code Lua almost daily, and your explanation confuses me.

Maths and general logical thinking really does help with scripting Lua. If you aren’t good at maths or logic, then you’ll have a real hard time learning Lua.

That applies to most languages, I don’t think I would have enjoyed coding if it wasn’t for maths.