Server banner Littletown Server banner V4B1
Server banner Build Server Discord
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The thread for coders, computer science hobbyists and whatnot
#11
(01-06-2017, 11:09 AM)DreeBott Wrote: I did try to program (GLua / Lua) But some stuff is just to "hard" for me...

I agree, i tried it myself and I can't figure it out. Maybe it's just to grasp the basics first, but I never figured out where to start.
[Image: OHyD732.png]
Want to know the secrets of space time continuum? Click here!
[-] The following 1 user Likes Midget's post:
  • DreeBott
Reply
#12
Yeah I tried Lua as well, difficult you get one thing done, 3 other things break in the process and give you a script error. And I'm just like nah son.



[Image: 5sPerm5.png]

Reply
#13
Lua ia actually easy-ish in my opinion, it helps if you know another coding language before hand to get started (like I did). It works kinda like real life languages work.
[Image: zdrBuCE.png]

Thanks Envy for the signature
[-] The following 1 user Likes Broccoli's post:
  • Arkten
Reply
#14
lua is actually a pretty easy language to code in, especially when we are talking about gLua. Thing is, you just make a .lua file, open it with your favourite editor, write in some code, start GMod and have fun experimenting. There is no need for compiling the code, like you would have to in C. Also the way the language works is very beginner friendly and less confusing (no semicolons after an action, no variable type defining, no declaring variables, no curly braces for if statements, no onetype variables only, no function types, no zerotable index...)

Here is a comparison of what C# would look like and what lua would look like:
Code:
public int main(string[] varargs) {
       System.Console.WriteLine(AddTwoNumbers(5, 10));
       return 0;
}

public int AddTwoNumbers(int a, int b) {
    private int ab = 0;
    ab = a + b;
    return ab;
}
Code:
function main()
      print(AddTwoNumbers(5, 10))
end

function AddTwoNumbers(a, b)
      local ab = a + b
      return ab
end

I left out the include shit for C# as this will make things even more complicated...
[-] The following 1 user Likes Arkten's post:
  • Broccoli
Reply
#15
(01-06-2017, 02:17 PM)MrTrashTag Wrote: lua is actually a pretty easy language to code in, especially when we are talking about gLua. Thing is, you just make a .lua file, open it with your favourite editor, write in some code, start GMod and have fun experimenting. There is no need for compiling the code, like you would have to in C. Also the way the language works is very beginner friendly and less confusing (no semicolons after an action, no variable type defining, no declaring variables, no curly braces for if statements, no onetype variables only, no function types, no zerotable index...)

Here is a comparison of what C# would look like and what lua would look like:

-Snip-

It literally is that simple, what I did to begin with is make a simple .lua file in the lua folder of Gmod and just went on the Gmod wiki and see what hooks/functions I could mess around with. (All the hooks are massively simple named for what they do).
[Image: zdrBuCE.png]

Thanks Envy for the signature
Reply
#16
^^ freaking hate it whe. They aren't names nicely

Anyone set their PlayerHP variable to instead DickButt??
Reply
#17
(01-06-2017, 11:09 AM)DreeBott Wrote: is just to "hard" for me...

That's what she said :)


[-] The following 3 users Like Faustin's post:
  • Arkten, Marty, Prompt
Reply
#18
Haha lol
Reply
#19
I'm making a game in college in unreal, currently there's two rooms one which is full of dank memes and one with a chair inside it.
[Image: ETQjSgL.jpg]
Made by Me
Reply
#20
VisualBasic mostly in GCSE Computer Science but a little bit of C++ and HTML
Reply




Users browsing this thread: 1 Guest(s)