Jump to content

How to start learning?


Recommended Posts

Hello dear users of this forum!

I'm a beginner in Lua and I don't how to start learning. I know some other languages. As JavaScript, Python, Pawno and etc. Can you help me with it? Which plugin create me for start? Thank you in advance and sorry for my English.

 

Link to comment
  • Moderators

If you know JavaScript, then lua is just a little kid.

 

Start running some basic code at a demo for example:

https://www.lua.org/demo.html

 

 

JavaScript

The syntax is different, but the rules are almost the same.

 

The most confusing part in lua compared to JS might be the fact that:

  • `let` variables which are written down with the `local` key word.
  • Variables without declaration are available in every script (within the same resource). (also known as globals)
  • `const` and `var` variable types do not exist in lua.
  • There are document code blocks. (which in Javascript you need iffy's to do this.)
  • Arrays and objects do not exist in lua. But tables can be used as an array, object and both at the same time.
  • Tables used as arrays start at the index 1 instead of 0.

 

 

  • Like 1
Link to comment
1 hour ago, IIYAMA said:

If you know JavaScript, then lua is just a little kid.

 

Start running some basic code at a demo for example:

https://www.lua.org/demo.html

 

 

JavaScript

The syntax is different, but the rules are almost the same.

 

The most confusing part in lua compared to JS might be the fact that:

  • `let` variables which are written down with the `local` key word.
  • Variables without declaration are available in every script (within the same resource). (also known as globals)
  • `const` and `var` variable types do not exist in lua.
  • There are document code blocks. (which in Javascript you need iffy's to do this.)
  • Arrays and objects do not exist in lua. But tables can be used as an array, object and both at the same time.
  • Tables used as arrays start at the index 1 instead of 0.
I read a lot of stuff. But I can't understand it. How to do anything. Can you help me? 
Link to comment
23 minutes ago, Skream said:

you probably don't know any of those languages if you just couldn't follow something simple as what IIYAMA said. About LUA, there's a tutorial session here https://forum.multitheftauto.com/forum/123-tutorials/

I read all turtorials which IIYAMA send. I cant understand this :Oing lua. It's hard for me. I tried to create scripts, but they didn't work. There weren't any problems in debug.

23 minutes ago, Skream said:

you probably don't know any of those languages if you just couldn't follow something simple as what IIYAMA said. About LUA, there's a tutorial session here https://forum.multitheftauto.com/forum/123-tutorials/

And I know JS, Python. I know the bases of lua. But I can't create any script for my project. If you will send a material which I read, please, don't reply this post.

Edited by CleyzChan
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...