init.lua and modifying Default Terrortown files
-
- New to forums
- Posts: 5
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Sun May 19, 2013 3:46 pm
init.lua and modifying Default Terrortown files
Hey there, I had a long conversation with support which boiled down to this:
I have a modified init.lua (located in /garrysmod/gamemodes/terrortown/gamemode). The default init.lua was deleted, moved, and hidden in a different folder. The edited init.lua has been moved and replaced. However, when there is no init.lua present, the server will not start in gamemode Terrortown (so it obviously has some impact).
The issue here is that the server is loading the default init.lua when it is not even on the server- only the modified one is.
Thanks in advance.
I have a modified init.lua (located in /garrysmod/gamemodes/terrortown/gamemode). The default init.lua was deleted, moved, and hidden in a different folder. The edited init.lua has been moved and replaced. However, when there is no init.lua present, the server will not start in gamemode Terrortown (so it obviously has some impact).
The issue here is that the server is loading the default init.lua when it is not even on the server- only the modified one is.
Thanks in advance.
Re: init.lua and modifying Default Terrortown files
Out of curiosity, how are you confirming that the default init.lua is the one being loaded?
Re: init.lua and modifying Default Terrortown files
What you see in the server's FTP is exactly what it's run from. If Garrysmod is somehow still loading the file when it is missing, then it must be somewhere else in the directory structure, or built-in in some way.
Re: init.lua and modifying Default Terrortown files
I added a print function to the code, and does NFO superimpose any default game mode files on the server?
Re: init.lua and modifying Default Terrortown files
I'm not sure what you mean when you say superimpose. What you see in the FTP is what exists on disk, though, as I mentioned -- there are no other files.
Re: init.lua and modifying Default Terrortown files
If I understand correctly, when you have your modified init.lua placed in /garrysmod/gamemodes/terrortown/gamemode, the server is still loading the init.lua that is not present?
I would check the includes in your modified init.lua to make sure it loading anything that isn't intended.
I would check the includes in your modified init.lua to make sure it loading anything that isn't intended.
Re: init.lua and modifying Default Terrortown files
So then why is TTT loading a nonexistent init.lua?
Not sure what you mean spray.
Not sure what you mean spray.
Re: init.lua and modifying Default Terrortown files
Sorry, I meant to say: I would check the includes in your modified init.lua to make sure it's not loading anything that isn't intended.Vexas wrote:So then why is TTT loading a nonexistent init.lua?
Not sure what you mean spray.
Is the init.lua script you've modified very different from the original?
Re: init.lua and modifying Default Terrortown files
There are a few possibilities.
- There's another copy of the file somewhere in the directory tree that the game is automatically loading.
- Another file is loaded automatically when init.lua is missing, or in addition to the init.lua file, and it does something similar.
- The game essentially has a built-in init.lua that it uses if one isn't found, or before one is loaded.
Re: init.lua and modifying Default Terrortown files
Other people have gotten the same file I'm using to work.
Re: init.lua and modifying Default Terrortown files
In that case, you're missing something, but I don't know what (and what I said about the problem's source still applies). Someone more familiar with what you're trying to do might be able to help more than I.
I just wanted to be clear that whatever is going on would not be due to our version of the files, since we just use the standard gmod distribution and you can see all of the files through the FTP.
I just wanted to be clear that whatever is going on would not be due to our version of the files, since we just use the standard gmod distribution and you can see all of the files through the FTP.
Re: init.lua and modifying Default Terrortown files
anyone else know where an init.lua would be found?
- ThatGuyNex
- This is my homepage
- Posts: 239
- Joined: Tue May 28, 2013 12:23 pm
Re: init.lua and modifying Default Terrortown files
If you would be so kind as to post the file in question I can take a look. I have a feeling that your modified file is in fact the one being loaded though. There are two types of lua files with garrysmod, those that are being run on the server, and those that are being run on the client (and technically those that run on both, but those are mainly files containing functions and declarations). Init.lua is the file that gets automatically loaded on the server end of things, as such, the standard print function would only be available if you were looking directly at the console. However, if you add -condebug to your launch parameters it will dump all console output into the console.log text file.
Edit: Also I would use this function instead of print for debugging lines:
Edit: Also I would use this function instead of print for debugging lines:
Code: Select all
MsgN("message")
Re: init.lua and modifying Default Terrortown files
Garrysmod comes with TTT by default - If you want a NEW file, go here
https://github.com/garrynewman/garrysmo ... terrortown
That has all the default TTT files that comes with gmod, and it even shows the file path the file should be put in.
So - Copy and paste the ini file from there, and just put it in the server.
https://github.com/garrynewman/garrysmo ... terrortown
That has all the default TTT files that comes with gmod, and it even shows the file path the file should be put in.
So - Copy and paste the ini file from there, and just put it in the server.