First off, I have no idea if this would go here or not. Second, whenever I follow the Wiki tutorial here: http://wiki.garrysmod.com/?title=Simple_Gamemode to make a gamemode, Garry’s Mod always says it cannot find cl_init.lua or init.lua. I even copied the exact text, placed it into the right files respectively and it did not work. I then downloaded the .zip, unzipped, added an info.txt and it still does not work. Does the Wiki have incorrect information or what?
Are you using require() to get the files? And is your info.txt correct?
see if the ZIP at the bottom works. if it does, you’re doing something wrong.
Do you have any spaces in the gamemode name?
Where would I put the require()? I have include in there. Yes the info.txt is correct. I think so at least.
There are no spaces.
Whoops. I was thinking of php. Ok and you have the addcsfile too?
Yeah I do.
Make sure your code is under the ‘gamemode’ directory inside your gamemode folder.
Something like *garrysmod\gamemodes<your gamemode name>\gamemode*.
Info.txt should go under *garrysmod\gamemodes<your gamemode name>* and should be the only file there.
Couldn’t include file ‘ASSDeathrun\gamemode\cl_init.lua’ (File not found) (<nowhere>)
There was a problem opening the gamemode file ‘ASSDeathrun/gamemode/cl_init.lua’
That is the error I get in console.
The path: “garrysmod\gamemodes\Deathrun” has info.txt
The path: “garrysmod\gamemodes\Deathrun\gamemode” has the cl_init.lua init.lua and shared.lua. The code is exactly the same as the tutorial.
You’re aware these are different? Are you trying to include a file under ‘ASSDeathrun\gamemode’ ?
Yeah I know, I deleted that part when I posted the directory. I’m not sure what I did either but I managed to fix the problem, now it works.
I find that AddCSLuaFile can be a douche sometimes, but most of the time its a dumb error on the coders part(AKA me. :suicide:)