Getting Started With Lua
From GMod Wiki
(→Where Do I Start?) |
(→Where Do I Start?) |
||
Line 7: | Line 7: | ||
First of all, you will need to get a script editor for lua.<br/> | First of all, you will need to get a script editor for lua.<br/> | ||
As lua code is typed in english and not compiled (coverted to computer code) when creating scripts, you only need a simple text editor such as notepad.<br/><br/> | As lua code is typed in english and not compiled (coverted to computer code) when creating scripts, you only need a simple text editor such as notepad.<br/><br/> | ||
- | However, for features such as syntax highlighting (colouring different parts of the code different colours), you will need to install a script editor such as [http://notepad-plus-plus.org/download Notepad++] Or sciTE( [http://opensource.ebswift.com/SciTEInstaller/] ) | + | However, for features such as syntax highlighting (colouring different parts of the code different colours), you will need to install a script editor such as [http://notepad-plus-plus.org/download Notepad++] Or '''sciTE'''( [http://opensource.ebswift.com/SciTEInstaller/] ) |
Notepad++ is a popular text-editing program within the Lua coding community, due to it being open source and extremly flexible when adding new syntax highlighting. It also allows you to change the colour, formatting style, and font style of the whole text-editor to make it a much more comfortable environment for you to work in. | Notepad++ is a popular text-editing program within the Lua coding community, due to it being open source and extremly flexible when adding new syntax highlighting. It also allows you to change the colour, formatting style, and font style of the whole text-editor to make it a much more comfortable environment for you to work in. |
Latest revision as of 18:45, 22 August 2011
Note: It's a good idea for you to read through the overview Page first if you haven't already. |
It is recommended you view the overview page first, for some basic information on lua.
This page is mainly about installing a script editor for creating lua scripts. If you have already chosen and installed a script editor, then you should start to read the tutorials.
Where Do I Start?
First of all, you will need to get a script editor for lua.
As lua code is typed in english and not compiled (coverted to computer code) when creating scripts, you only need a simple text editor such as notepad.
However, for features such as syntax highlighting (colouring different parts of the code different colours), you will need to install a script editor such as Notepad++ Or sciTE( [1] )
Notepad++ is a popular text-editing program within the Lua coding community, due to it being open source and extremly flexible when adding new syntax highlighting. It also allows you to change the colour, formatting style, and font style of the whole text-editor to make it a much more comfortable environment for you to work in.
Post-Installation
When you have successfully installed it, and have launched it, you should be greeted by this
First thing you will notice, that if you type any lua syntax, it will not be highlighted, to fix this go to Plugins >> Plugin Manager >> Show Plugin Manager and find the following Syntax Highlighter in the "Available" tab and click 'Install'
This smaller window will be shown during installation
After the installation of the Gmod Lua syntax highlighter is complete, you need to go to Settings >> Preferences >> New Document/Default File Directory and set the Default Language to "Gmod Lua", after that, just click close (Making sure Gmod Lua has been selected)
Now you're ready to code Your First Scripted Weapon.