autorun.lua file

so I have a autorun file in my server so that my addons will get downloaded to the cilent. And it works and everything but their just a couple that r telling me that they r getting errors with some addons while some arent. Is it possible that the addon is just not getting mounted properly to the cilent? heres my autorun file
[lua]
–This is a list of your server’s maps which are available through the workshop
–Each one uses the map file’s name and the workshop ID
maplist = {}

maplist[“ph_zombie_bunker”] = “169654038”
maplist[“ph_lockup”] = “229178387”
maplist[“ph_school”] = “224835916”
maplist[“ph_office”] = “188818807”
maplist[“ph_school”] = “224835916”
maplist[“ph_wolfsmanor”] = “228474298”

–add more maps here

local map = game.GetMap() – Get’s the current map name
local workshopid = maplist[map]
– Finds the workshop ID for the current map name from the table above

if( workshopid != nil )then
–If the map is in the table above, add it through workshop
print( "[WORKSHOP] Setting up maps. " …map… " workshop ID: " …workshopid )
resource.AddWorkshop( “169654038” ) // zombie bunker map
resource.AddWorkshop( “229178387” ) // lockup map
resource.AddWorkshop( “224835916” ) // school map
resource.AddWorkshop( “188818807” ) // office map
resource.AddWorkshop( “224835916” ) // schoolmap
resource.AddWorkshop( “228474298” ) // wolfsmanor map
resource.AddWorkshop( “192345758” ) // motelblackmappack
resource.AddWorkshop( “187933083” ) // CSSWeapons
resource.AddWorkshop( “156924206” ) // woody model
resource.AddWorkshop( “156873942” ) // laserminigun
resource.AddWorkshop( “261948810” ) // raygun
resource.AddWorkshop( “218496304” ) // tttminigun
resource.AddWorkshop( “189632949” ) // fingergun
resource.AddWorkshop( “184425972” ) // carnage
resource.AddWorkshop( “158351769” ) // turtles

else
–If not, ) then hope the server has FastDL or the client has the map
print( “[WORKSHOP] Not available for current map. Using FastDL instead hopefully…” )
end
[/lua]

What you are doing is adding all the other addons only if the map on the server exists in your maplist table.

Take out all your resource.AddWorkshop calls out of if-then-else, and put in resource.AddWorkshop( workshopid )

[editline]12th October 2014[/editline]

Also get rid of the resource.AddWorkshop calls for maps. Use only the automatic thing.

alright ill give it a try, thanx for the feedback

r u talking like this ?
[lua]
–This is a list of your server’s maps which are available through the workshop
–Each one uses the map file’s name and the workshop ID
maplist = {}

maplist[“ph_zombie_bunker”] = “169654038”
maplist[“ph_lockup”] = “229178387”
maplist[“ph_school”] = “224835916”
maplist[“ph_office”] = “188818807”
maplist[“ph_school”] = “224835916”
maplist[“ph_wolfsmanor”] = “228474298”

resource.AddWorkshop( "187933083" ) // CSSWeapons
resource.AddWorkshop( "156924206" )	// woody model
resource.AddWorkshop( "156873942" )	// laserminigun
resource.AddWorkshop( "261948810" )	// raygun
resource.AddWorkshop( "218496304" )	// tttminigun
resource.AddWorkshop( "189632949" )	// fingergun
resource.AddWorkshop( "184425972" ) // carnage
resource.AddWorkshop( "158351769" ) // turtles

[/lua]

More like this:



--This is a list of your server's maps which are available through the workshop
--Each one uses the map file's name and the workshop ID
maplist = {}
maplist["ph_zombie_bunker"] = "169654038"
maplist["ph_lockup"] = "229178387"
maplist["ph_school"] = "224835916"
maplist["ph_office"] = "188818807"
maplist["ph_school"] = "224835916"
maplist["ph_wolfsmanor"] = "228474298"
// add more maps here

local workshopid = maplist[ game.GetMap() ] -- Finds the workshop ID for the current map name from the table above

if( workshopid != nil )then
	--If the map is in the table above, add it through workshop
	print( "[WORKSHOP] Setting up maps. " ..map.. " workshop ID: " ..workshopid )
	resource.AddWorkshop( workshopid )
else
	--If not, then hope the server has FastDL or the client has the map
	print( "[WORKSHOP] Not available for current map. Using FastDL instead hopefully..." )
end

// Non map addons
resource.AddWorkshop( "187933083" ) // CSSWeapons
resource.AddWorkshop( "156924206" ) // woody model
resource.AddWorkshop( "156873942" ) // laserminigun
resource.AddWorkshop( "261948810" ) // raygun
resource.AddWorkshop( "218496304" ) // tttminigun
resource.AddWorkshop( "189632949" ) // fingergun
resource.AddWorkshop( "184425972" ) // carnage
resource.AddWorkshop( "158351769" ) // turtles


thanx again ill give it a try