LUA Script error.

Im currently in the process of getting my old gmod 12 addons to be compatible with gmod 13 and I am getting stumped on this error

[ERROR] addons/mcdc-v2/lua/autorun/civiliancars.lua:3: attempt to call global ‘GetMountedContent’ (a nil value)

  1. unknown - addons/mcdc-v2/lua/autorun/civiliancars.lua:3

the civiliancars.lua error location is:

print(table.HasValue(GetMountedContent(), “ep1”))

Ived searched through the changes on https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit?pli=1#heading=h.rqk56swttgps
but cannot for the life of me figure this out. Thanks in advanced.

I believe it’s called “episodic” not “ep1”

Oh i missed that but unfortunately the error still appears :confused:

Could you possibly post the whole code of civiliancars.lua?
And please put it in [lua] tags :slight_smile:


local Category = "Master Chris's Vehicles"

print(table.HasValue(GetMountedContent(), "episodic"))
local V = {
			Name = "1969 Dodge Charger",
			Class = "prop_vehicle_jeep",
			Category = Category,
			Author = "Master Chris",
			Information = "Classic Muscle Car",
			Model = "models/vehicles/cars/69charger.mdl",
			//Vehicle Controller
			VC_Lights = { //Pos can be a simple Vector() relative to the vehicle or an attachment name, else is self explanatory, can be an infinite amount of these.
						{Pos = Vector(-31.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(31.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(-21, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(21, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(-10.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0"},
						{Pos = Vector(10.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0"},
						{Pos = Vector(-33.5, 122, 32), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 255 255"},
						{Pos = Vector(33.5, 122, 32), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 255 255"},
						{Pos = Vector(-17.6, -122, 22), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, ReverseColor = "255 255 255"},
						{Pos = Vector(17.6, -122, 22), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, ReverseColor = "255 255 255"},
						{Pos = Vector(-30.1, 122, 18.1), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, NormalColor = "255 255 200", BlinkersColor = "255 255 200"},
						{Pos = Vector(30.1, 122, 18.1), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, NormalColor = "255 255 200", BlinkersColor = "255 255 200"},
						{Pos = Vector(-24, 115, 32), Size = 1, GlowSize = 1, HeadLightAngle = Angle(5, 95, 0)},
						{Pos = Vector(24, 115, 32), Size = 1, GlowSize = 1, HeadLightAngle = Angle(5, 85, 0)}
						},
			VC_ExtraSeats = { //Can be an infinite amount of seats, Pos and ExitPos can be a simple Vector() or an attachment name, other options are self explanatory.
							{Pos = Vector(20, 3, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							{Pos = Vector(-20, -30, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							{Pos = Vector(20, -30, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							},
			VC_Horn = {Sound = "vehicles/vc_horn_light.wav", Pitch = 100, Looping = false}, //Horn sound the car will use.
			VC_Exhaust = { //Exhaust effect, only active when engine is on, can be infinite amount.
						{Pos = Vector(-17.6, -121, 17), Ang = Angle(0,0,90), EffectIdle = "Exhaust", EffectStress = "Exhaust"}, //Pos and Ang are relative to the vehicle, Pos - a simple vector or an attachment name, effect has to be a looping particle effect.
						{Pos = Vector(17.6, -121, 17), Ang = Angle(0,0,90), EffectIdle = "Exhaust", EffectStress = "Exhaust"}
						},
			VC_Exhaust_Dissipate = true, //Remove the exhaust effect when car reaches certain velocity.
			//
			KeyValues = {
						vehiclescript	=	"scripts/vehicles/69charger.txt",
						}
			}
list.Set("Vehicles", "69Charger", V)

local V = {
			Name = "April Fools Charger",
			Class = "prop_vehicle_jeep",
			Category = "nothing to see here",
			Author = "Master Chris",
			Information = "Totally not a Classic Muscle Car",
			Model = "models/vehicles/cars/1969charger.mdl",
			//Vehicle Controller
			VC_Lights = { //Pos can be a simple Vector() relative to the vehicle or an attachment name, else is self explanatory, can be an infinite amount of these.
						{Pos = Vector(-31.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(31.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(-21, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(21, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0", BrakeColor = "255 0 0", BlinkersColor = "255 0 0"},
						{Pos = Vector(-10.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0"},
						{Pos = Vector(10.2, -120, 35.4), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 0 0"},
						{Pos = Vector(-32, 122, 32), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 255 255"},
						{Pos = Vector(32, 122, 32), Mat = "sprites/glow1.vmt", Alpha = 165, Size = 0.6, DynLight = true, NormalColor = "255 255 255"},
						{Pos = Vector(-17.6, -122, 22), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, ReverseColor = "255 255 255"},
						{Pos = Vector(17.6, -122, 22), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, ReverseColor = "255 255 255"},
						{Pos = Vector(-30.1, 122, 18.1), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, NormalColor = "255 255 200", BlinkersColor = "255 255 200"},
						{Pos = Vector(30.1, 122, 18.1), Mat = "sprites/glow1.vmt", Alpha = 170, Size = 0.5, DynLight = true, NormalColor = "255 255 200", BlinkersColor = "255 255 200"},
						{Pos = Vector(-24, 115, 32), Size = 1, GlowSize = 1, HeadLightAngle = Angle(5, 95, 0)},
						{Pos = Vector(24, 115, 32), Size = 1, GlowSize = 1, HeadLightAngle = Angle(5, 85, 0)}
						},
			VC_ExtraSeats = { //Can be an infinite amount of seats, Pos and ExitPos can be a simple Vector() or an attachment name, other options are self explanatory.
							{Pos = Vector(20, 3, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							{Pos = Vector(-20, -30, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							{Pos = Vector(20, -30, 25.5), Ang = Angle(0, 0, 0), EnterRange = 80, ExitAng = Angle(0, -90, 0), Model = "models/props_phx/carseat2.mdl", ModelOffset = Vector(12, 0, 4), Hide = true, DoorSounds = true, RadioControl = true},
							},
			VC_Horn = {Sound = "vehicles/vc_horn_light.wav", Pitch = 100, Looping = false}, //Horn sound the car will use.
			VC_Exhaust = { //Exhaust effect, only active when engine is on, can be infinite amount.
						{Pos = Vector(-17.6, -121, 17), Ang = Angle(0,0,90), EffectIdle = "Exhaust", EffectStress = "Exhaust"}, //Pos and Ang are relative to the vehicle, Pos - a simple vector or an attachment name, effect has to be a looping particle effect.
						{Pos = Vector(17.6, -121, 17), Ang = Angle(0,0,90), EffectIdle = "Exhaust", EffectStress = "Exhaust"}
						},
			VC_Exhaust_Dissipate = true, //Remove the exhaust effect when car reaches certain velocity.
			//
			KeyValues = {
						vehiclescript	=	"scripts/vehicles/1969charger.txt",
						}
			}
list.Set("Vehicles", "afcharger", V)

*bump