GMod server workshop problems

Hey guys, me again with a similar problem as before, my server downloads all of the addons from the workshop just fine, but my resource.lua file doesn’t work and the clients don’t download any of the addons. It only works sometimes, and its wierd, i can get it to work sometimes by just messing around with the file, but once i get it to work it stops working after a server reboot. Anyone else having this problem? Heres the contents of my file:



if ( SERVER ) then
	if (GAMEMODE_NAME == "terrortown") then
		--ADDONS(ttt)
		resource.AddWorkshop("127865722") --More_ttt_ulx_commands
		resource.AddWorkshop("249131537") --TTT_Flashbang
		resource.AddWorkshop("254177306") --TTT_S.L.A.M
		resource.AddWorkshop("185609021") --Atmos
		resource.AddWorkshop("194965598") --TTT_Wapon_collection
		resource.AddWorkshop("252189849") --Orbital_bass_cannon
		resource.AddWorkshop("151583504") --MapVote
		resource.AddWorkshop("265714452") --TTT_Grappel_hook
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("248643568") --shrek_playermodel
		
		--MAPS(ttt)
		--ttt maps http://maps.theterrornetwork.com/
		game.GetMap("273504738") --TTT_krusty_krab
		game.GetMap("270494654") --ttt_mc_tipsky_b4
		game.GetMap("121935805") --TTT_Vessel
		game.GetMap("195227686") --TTT_Dolls
		game.GetMap("159321088") --TTT_minecraft_b5
		game.GetMap("141103402") --ttt_bb_teenroom_b2
		game.GetMap("264985131") --TTT_Suburb
		game.GetMap("104647026") --ttt_67thway_v3
		game.GetMap("260153473") --ttt_mc_mineshaft
		
	elseif (GAMEMODE_NAME == "sandbox") then
		--ADDONS(sandbox)
		resource.AddWorkshop("266915261") --Melon_gun
		resource.AddWorkshop("160250458") --wiremod
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("130645575") --Minecraft_Skin_Changer
		resource.AddWorkshop("248643568") --shrek_playermodel
		resource.AddWorkshop("139151773") --Ferrari_f1
		resource.AddWorkshop("106161263") --mlp_cars_pack
		resource.AddWorkshop("219981273") --Mazda_787b
		resource.AddWorkshop("106565409") --Nuke_Pack_4
		resource.AddWorkshop("138261050") --McLauren
		resource.AddWorkshop("262754576") --Audi R18
		resource.AddWorkshop("249240597") --Lotus E21
		resource.AddWorkshop("248965362") --Ford Mustang
		resource.AddWorkshop("239472888") --Chevrolet MonteCarlo
		
		--MAPS(sandbox)
		game.GetMap("104468359") --gm_construct_flatgrass
		game.GetMap("276242983") --gm_KronoRing
		
	elseif (GAMEMODE_NAME == "murder") then
		--ADDONS(murder)
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("248643568") --shrek_playermodel
		
		--MAPS(murder)
	end
end


I feel like im doing something wrong, but i dont know what it is.
if you guys can help me that would be great :smiley:

Thanks again,
Nern

-snip- nvm

That file is in lua/autorun, yeah?

yeah its in lua/autorun/server/

Move it to lua/autorun.

That diddnt work, its doing the same thing :confused:

Put a print somewhere in there to see when the file is ran.

it doesnt print anything. I reboot the server , and i dont see it print what i put in. I try logging into the server and it still doesnt print anything to the console.



if ( SERVER ) then
local w=1
	while w<100 do
		print("LOADING......")
		w=w+1
	end
	if (GAMEMODE_NAME == "terrortown") then
		--ADDONS(ttt)
		resource.AddWorkshop("127865722") --More_ttt_ulx_commands
		resource.AddWorkshop("249131537") --TTT_Flashbang
		resource.AddWorkshop("254177306") --TTT_S.L.A.M
		resource.AddWorkshop("185609021") --Atmos
		resource.AddWorkshop("194965598") --TTT_Wapon_collection
		resource.AddWorkshop("252189849") --Orbital_bass_cannon
		resource.AddWorkshop("151583504") --MapVote
		resource.AddWorkshop("265714452") --TTT_Grappel_hook
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("248643568") --shrek_playermodel
		
		--MAPS(ttt)
		--ttt maps http://maps.theterrornetwork.com/
		game.GetMap("273504738") --TTT_krusty_krab
		game.GetMap("270494654") --ttt_mc_tipsky_b4
		game.GetMap("121935805") --TTT_Vessel
		game.GetMap("195227686") --TTT_Dolls
		game.GetMap("159321088") --TTT_minecraft_b5
		game.GetMap("141103402") --ttt_bb_teenroom_b2
		game.GetMap("264985131") --TTT_Suburb
		game.GetMap("104647026") --ttt_67thway_v3
		game.GetMap("260153473") --ttt_mc_mineshaft
		
	elseif (GAMEMODE_NAME == "sandbox") then
		--ADDONS(sandbox)
		resource.AddWorkshop("266915261") --Melon_gun
		resource.AddWorkshop("160250458") --wiremod
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("248643568") --shrek_playermodel
		resource.AddWorkshop("139151773") --Ferrari_f1
		resource.AddWorkshop("106161263") --mlp_cars_pack
		resource.AddWorkshop("219981273") --Mazda_787b5
		resource.AddWorkshop("106565409") --Nuke_Pack_4
		resource.AddWorkshop("138261050") --McLauren
		resource.AddWorkshop("262754576") --Audi R18
		resource.AddWorkshop("249240597") --Lotus E21
		resource.AddWorkshop("248965362") --Ford Mustang
		resource.AddWorkshop("239472888") --Chevrolet MonteCarlo
		
		--MAPS(sandbox)
		game.GetMap("104468359") --gm_construct_flatgrass
		game.GetMap("276242983") --gm_KronoRing
		local i=1
		while i<100 do
			print("SANDBOX LUA STARTED")
			i=i+1
		end
		
	elseif (GAMEMODE_NAME == "murder") then
		--ADDONS(murder)
		resource.AddWorkshop("107155115") --Pony_Playermodel
		resource.AddWorkshop("104694154") --mane_six
		resource.AddWorkshop("106904944") --My_Little_Other_Ponies
		resource.AddWorkshop("111567786") --My_Little_Other_Ragdolls
		resource.AddWorkshop("160853880") --changeling_player_model
		resource.AddWorkshop("248643568") --shrek_playermodel
		
		--MAPS(murder)
	end
end


bump