Jump to content
Fafy

[Tutorial] The basics of Lua

Recommended Posts

This is a really good tutorial, you've basically re-taught me in like 10 minutes what my computer science teacher has taught us in 4 months only this is in Lua and not Pseudo code or visual basics. I'll be sure to hand this over to anyone who wants to learn Lua.

 

 

Great job! 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
Achievements

Very awesome work so far! ? I love the learn-by-examples(/doing) approach.

 

I can think of two things that I would like to see added/changed in the tutorial:

  • How to get the length of a table
  • Very nitpick: userdata is not handled by GMOD explicitly. It is a part of the Lua standard (which I assume is what you mean). It differs from tables by using low-level C data structures, which means it uses less memory than its table alternative. However, most of the time tables should definitely be favored unless you cannot avoid userdata (e.g. GMOD's GUI elements heavily rely on userdata).

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

3 hours ago, Nick said:

Very awesome work so far! ? I love the learn-by-examples(/doing) approach.

 

I can think of two things that I would like to see added/changed in the tutorial:

  • How to get the length of a table
  • Very nitpick: userdata is not handled by GMOD explicitly. It is a part of the Lua standard (which I assume is what you mean). It differs from tables by using low-level C data structures, which means it uses less memory than its table alternative. However, most of the time tables should definitely be favored unless you cannot avoid userdata (e.g. GMOD's GUI elements heavily rely on userdata).

 

 

I updated the post, thanks!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...