CleyzChan Posted June 19, 2018 Share Posted June 19, 2018 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 IIYAMA Posted June 19, 2018 Moderators Share Posted June 19, 2018 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. 1 Link to comment
CleyzChan Posted June 19, 2018 Author Share Posted June 19, 2018 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
Skream Posted June 19, 2018 Share Posted June 19, 2018 (edited) 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/ Edited June 19, 2018 by Skream Link to comment
CleyzChan Posted June 19, 2018 Author Share Posted June 19, 2018 (edited) 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 June 19, 2018 by CleyzChan Link to comment
Moderators IIYAMA Posted June 19, 2018 Moderators Share Posted June 19, 2018 @CleyzChan How about you write the things in JavaScript, then I will explain you how to write those in Lua? Link to comment
CleyzChan Posted June 19, 2018 Author Share Posted June 19, 2018 2 hours ago, IIYAMA said: @CleyzChan How about you write the things in JavaScript, then I will explain you how to write those in Lua? Thank you. I already found a techer. Sorry to disturb. Sorry for my English) Link to comment
AlexRazor Posted June 20, 2018 Share Posted June 20, 2018 I just watched one or two videos like "Lua in hour" and then looked through some source codes of resources and mta scripts, then tried to write what i needed. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now