Alright. As you can tell by the title I'm not being so successful. I looked at the [URL]http://www.guilddnr.net/dunescape/temp.txt[/URL] guide which looked pretty straight forward and such, but I have been having some problems. Here it is:
It tells me to open up "Notepad" and to write out:
Msg("Hello World!")
I do this. And I save my file to the: STEAM>STEAMAPPS>"MYUSERNAME">GARRYSMOD>GARRYSMOD>LUA folder.
When I open up Garrys Mod and type:
"lua_openscript helloworld.lua"
it says:
Couldn't include file 'helloworld.lua' (File not found)
Please help!
Are you sure you have saved the file as a .lua? Make sure your operating system allows you to see the file extensions.
Also I recommend you get both Notepad ++ and luapad to help you test code.
Okay I think this is where I might be going wrong.
I look at my " " " Garrysmod>Lua> and I see two things at the bottom"
One is a LUA file and the other is a text document.
My "Hello World!" is the text document... is it supposed to be like that?
As Crazy Quebec said, you need to save it as a .lua file. You've managed to save it as a .txt file because viewing extensions isn't turned on.
Here's how you enable viewing file extensions:
[url=http://www.tech-recipes.com/rx/1269/vista_show_unhide_file_extensions/]If you're using Vista[/url]
[url=http://malektips.com/windows-7-view-file-extensions.html]Or this if you're using Windows 7[/url]
[url=http://www.wikihow.com/Disable-Hidden-File-Extensions-in-Windows-XP]Or if you'd by any chance be using Windows XP[/url]
[QUOTE=TechedRonan;22139461]As Crazy Quebec said, you need to save it as a .lua file. You've managed to save it as a .txt file because viewing extensions isn't turned on.
Here's how you enable viewing file extensions:
[URL="http://www.tech-recipes.com/rx/1269/vista_show_unhide_file_extensions/"]If you're using Vista[/URL]
[URL="http://malektips.com/windows-7-view-file-extensions.html"]Or this if you're using Windows 7[/URL]
[URL="http://www.wikihow.com/Disable-Hidden-File-Extensions-in-Windows-XP"]Or if you'd by any chance be using Windows XP[/URL][/QUOTE]
Okay great! Thanks!
Okay so the file is now turned into a lua file. But when I try and:
[B]lua_openscript helloworld.lua[/B]
It says this:
[B]Running script helloworld.lua...
helloworld.lua:1: unexpected symbol near '['[/B]
When I wrote the script in notepad this is exactly what I put.
[B][*lua][/B]
[B]Msg("Hello World!")[/B]
[B][*/lua][/B]
Just without the "[B]*[/B]" before the [B]"Lua".[/B]
[B]
[/B]
You shouldn't wrap the code in Lua tags. Remove the [noparse][lua][/lua][/noparse].
Your not supposed to have lua tags around your lua code in that way...
[editline]09:16PM[/editline]
:ninja:
You don't put the [noparse][lua][/lua][/noparse] tags inside the script.
:ninja::ninja:
So do I just type:
[B]Msg("Hello World!")[/B] ?
Yes
[QUOTE=Pants Magee;22149322]So do I just type:
[B]Msg("Hello World!")[/B] ?[/QUOTE]
Yes.
[editline]08:22PM[/editline]
:ninja: retaliation.
Alright thanks guys. : )
And it works!! Thanks alot guys.
If you're wanting to create Lua files easily, try downloading Notepad++ and downloading the Gmod Lua Lexer plugin from the built-in Plugin Manager
[QUOTE=HeavyMtl123;22149383]If you're wanting to create Lua files easily, try downloading Notepad++ and downloading the Gmod Lua Lexer plugin from the built-in Plugin Manager[/QUOTE]
When I head to the google website for the downloads of the Gmod Plugins, there are four
downloads. Which one do I download?
Hang on, I will give you the link to both.
Notepad++ : [url]http://sourceforge.net/projects/notepad-plus/files/[/url]
Plugin : [url]http://npp-gmod-lua.googlecode.com/files/NppGmodLuaPlugin-v1.4.zip[/url]
[editline]08:50PM[/editline]
That should help.
Also, if you ever need to check something, check the wiki first to see how it works, before asking on here.
[QUOTE=HeavyMtl123;22149772]
Also, if you ever need to check something, check the wiki first to see how it works, before asking on here.[/QUOTE]
If only you did this
[QUOTE=|King Flawless|;22150415]If only you did this[/QUOTE]
Why are you telling that to me? You have plenty of questions on here that are answered by the wiki.
[QUOTE=HeavyMtl123;22158637]Why are you telling that to me? You have plenty of questions on here that are answered by the wiki.[/QUOTE]
He's talking about me :P
Sorry, you need to Log In to post a reply to this thread.