I'm very new to lua, the only thing I've done is alter a few values through notepad. I was wondering if anyone could help me by telling me how to start a .lua file.
Thanks for any help
It really depends on what your trying to make. There are some good guides to LUA if you would like those links i can get them for you. Also, have you programmed before?
right click -> rename -> something.txt -> something.lua
You could simply use notepad and save it as a .lua. Or rename it from txt to lua. Let me suggest right away you try and use [url=http://www.facepunch.com/showthread.php?t=477505]Notepad++ with a Gmod Syntax plugin.[/url] It'll make life much more easier for you. :)
edit : You too devinmrn ;)
[QUOTE=ILOVECASH;16730310]right click -> rename -> something.txt -> something.lua[/QUOTE]
Yeah...Doesn't work...
Anyway, I haven't really programmed much. I've made some simple crap in command prompt for my computer class but that's really it. Could you post the links?
Oh yeah, I was trying to make extra weapons for npcs (If that helps any).
[QUOTE=Doomednuclei;16730400]Yeah...Doesn't work...[/QUOTE]
Of course it does. A lua file is really a txt file with a different extension. Make sure your operating system is not hiding the extensions.
First of all why the hell is every post here marked Dumb?
If you are using Notepad, when you save the file, Find the dropdown box for "Save As Type" and click "All Files" Then simply save it as <whatever>.lua
Its the same thing for Notepad++ or practically any text editor.
I tried Severed Skulls way and it worked. I tried that before, just didn't click "all types". And I have no clue why everything is marked as dumb. Thanks everyone!
[QUOTE=Crazy Quebec;16730322]You could simply use notepad and save it as a .lua. Or rename it from txt to lua. Let me suggest right away you try and use [url=http://www.facepunch.com/showthread.php?t=477505]Notepad++ with a Gmod Syntax plugin.[/url] It'll make life much more easier for you. :)
edit : You too devinmrn ;)[/QUOTE]
Haha I know it really is a lot simpler with that little plug-in :)!
-snip- Nevermind... Misready post
Hi, Im new to scripting and my friend taught me how to make this Script for Bhopping. it isnt working for m and I dont know how to fix it, this is the script
if (input.IsKeyDown( KEY_SPACE ) ) then
if LocalPlayer():IsOnGround() then
RunConsoleCommand("+jump")
HasJumped = 1
else
And when I put it in lua and all that I type in console: lua_openscript_cl bhop.lua
and in console it says this :
[ERROR] lua/bhop.lua:6: 'end' expected (to close 'if' at line 3) near '<eof>'
1. unknown - lua/bhop.lua:0
I was wondering if anyone could help me Also I would like to know how to turn the script off.
Thanks
[highlight](User was banned for this post ("bumping a 5 year old thread" - MaxOfS2D))[/highlight]
There's no end after else.
Everything is rated dumb because this is a thread about how to change a file extension
[QUOTE=boboftheray;43449599]Everything is rated dumb because this is a thread about how to change a file extension[/QUOTE]
This thread is four fucking years old.
Sorry, you need to Log In to post a reply to this thread.