Lua error with custom printer! :( Help!

Hello so I am trying to add a custom entity and I keep getting 1 lua error, this is what it said!

‘ENT’ is being indexed like it is a table, but in reality it does not exist (is nil).

Hints:

  • You either have ‘something.somethingElse’, ‘something[somethingElse]’ or ‘something:somethingElse(more)’. The ‘something’ here does not exist.

My code!


AddCSLuaFile()

-- BASE SETTINGS

ENT.Base      = "base_money_printer"
ENT.Type      = "anim"
ENT.Spawnable = false
ENT.AdminOnly = false

-- MAIN SETTINGS

ENT.Author         = "husho"
ENT.PrintName      = "Standard Money Printer"
ENT.PrinterColor   = Color(230, 230, 230, 255)
ENT.Pages          = {"General", "Upgrades", "Statistics"}
ENT.SparkingEffect = false

-- SOUND SETTINGS

-- Will printer make printing sound ?
ENT.MakePrintingSound = true
-- Volume of this sound
ENT.SoundLevel = 40

-- DISPLAY SETTINGS

if CLIENT then
	-- GENERAL BOXES CHANGES
	
	ENT.BoxesRadiusCorner = 5
	ENT.ShadowEnabled = false
	ENT.ShadowColor = Color(0, 0, 0, 100)

	-- TOP MENU
	
	ENT.NameOwnerBoxColor = Color(0, 0, 0, 100)
	ENT.NameTextColor     = Color(230, 230, 230, 255)
	ENT.OwnerTextColor    = Color(230, 230, 230, 255)
	
	-- MIDDLE MENU
	
	ENT.PageBoxColor  = Color(0, 0, 0, 100)
	ENT.PageTextColor = Color(230, 230, 230, 255)
	
	-- BOTTOM MENU
	
	ENT.ButtonsBoxColor  = Color(0, 0, 0, 100)
	ENT.CurPageTextColor = Color(230, 230, 230, 255)
	
	-- BUTTONS
	
	ENT.ButtonsColor        = Color(250, 250, 250, 100)
	ENT.ButtonsColorHovered = Color(250, 250, 250, 200)
	ENT.ButtonsTextColor    = Color(230, 230, 230, 255)
	
	-- BATTERY
	
	ENT.BatteryBoxColor  = Color(0, 0, 0, 150)
	ENT.BatteryBgColor   = Color(230, 230, 230, 255)
	ENT.BatteryTextColor = Color(230, 230, 230, 255)
	
	-- SPECIALS
	
	-- Color of the "Withdraw" text
	ENT.WithdrawText = Color(70, 90, 240, 255)
	-- Color of the "Cool" text
	ENT.CoolingText = Color(0, 200, 200, 255)
	-- Color of the upgrades text
	ENT.UpgradeCostText = Color(0, 140, 0, 255)
end

-- PRINTING SPEED

-- Time used to print money (decreases over upgrades)
ENT.PrintingSpeed = 30
-- Time takes the printer to reload
ENT.ReloadingTime = 3
-- Will the printer have speed upgrade?
ENT.UpgradablePrintingSpeed = true

-- SPEED LEVELS

ENT.PrintingSpeedLevels = {
	{LevelName = "None",     NameColor = Color(255, 255, 255, 255), Multiplier = 1,   MoneyToUpgrade = 0},
	{LevelName = "Copper",   NameColor = Color(184, 115, 51, 255),  Multiplier = 1.5, MoneyToUpgrade = 1000},
	{LevelName = "Silver",   NameColor = Color(229, 228, 226, 255), Multiplier = 2,   MoneyToUpgrade = 1500},
	{LevelName = "Gold",     NameColor = Color(255, 215, 0, 255),   Multiplier = 3,   MoneyToUpgrade = 3000},
	{LevelName = "Diamond",  NameColor = Color(185, 242, 255, 255), Multiplier = 4,   MoneyToUpgrade = 5000},
	{LevelName = "Ruby",     NameColor = Color(155, 17, 30, 255),   Multiplier = 6,   MoneyToUpgrade = 8000},
	{LevelName = "Sapphire", NameColor = Color(15, 82, 186, 255),   Multiplier = 8,   MoneyToUpgrade = 15000}
}

-- PRINTER STORAGE

-- Will the printer allow storage ?
ENT.InPrinterStorage = true
-- Will the printer drop money when full ?
ENT.PrintOutsideIfFull = false
-- Will the printer have infinite storage ? (nice feature for VIP printers)
ENT.InfinitePrinterStorage = false
-- Default amount of money that can be stored in the printer (increases with upgrades)
ENT.DefaultMaxMoneyStorage = 10000
 -- Will the printer have storage upgrade ?
ENT.UpgradablePrinterStorage = true

-- Storage Levels
ENT.PrinterStorageLevels = {
	{LevelName = "None",     NameColor = Color(255, 255, 255, 255), Multiplier = 1,   MoneyToUpgrade = 0},
	{LevelName = "Copper",   NameColor = Color(184, 115, 51, 255),  Multiplier = 1.5, MoneyToUpgrade = 1000},
	{LevelName = "Silver",   NameColor = Color(229, 228, 226, 255), Multiplier = 2,   MoneyToUpgrade = 1500},
	{LevelName = "Gold",     NameColor = Color(255, 215, 0, 255),   Multiplier = 3,   MoneyToUpgrade = 3000},
	{LevelName = "Diamond",  NameColor = Color(185, 242, 255, 255), Multiplier = 4,   MoneyToUpgrade = 5000},
	{LevelName = "Ruby",     NameColor = Color(155, 17, 30, 255),   Multiplier = 6,   MoneyToUpgrade = 8000},
	{LevelName = "Sapphire", NameColor = Color(15, 82, 186, 255),   Multiplier = 8,   MoneyToUpgrade = 15000}
}

-- PRINTING QUALITY

-- Amount of money printed (increased with upgrades)
ENT.PrintMoney = 25
-- Will the printer have quality upgrades ?
ENT.UpgradablePrintingQuality = true

-- QUALITY LEVELS

ENT.PrintingQualityLevels = {
	{LevelName = "None",     NameColor = Color(255, 255, 255, 255), Multiplier = 1,   MoneyToUpgrade = 0},
	{LevelName = "Copper",   NameColor = Color(184, 115, 51, 255),  Multiplier = 1.5, MoneyToUpgrade = 1000},
	{LevelName = "Silver",   NameColor = Color(229, 228, 226, 255), Multiplier = 2,   MoneyToUpgrade = 1500},
	{LevelName = "Gold",     NameColor = Color(255, 215, 0, 255),   Multiplier = 3,   MoneyToUpgrade = 3000},
	{LevelName = "Diamond",  NameColor = Color(185, 242, 255, 255), Multiplier = 4,   MoneyToUpgrade = 5000},
	{LevelName = "Ruby",     NameColor = Color(155, 17, 30, 255),   Multiplier = 6,   MoneyToUpgrade = 8000},
	{LevelName = "Sapphire", NameColor = Color(15, 82, 186, 255),   Multiplier = 8,   MoneyToUpgrade = 15000}
}

-- PRINTER TEMPERATURE AND COOLING

-- Will the printer explode when get damaged ?
ENT.CreateExplosionWhenDestroy = true
-- Will the printer have temperature status ?
ENT.EnableTemperature = true 
-- Will the printer have cooling upgrades ?
ENT.UpgradableCooling = true 
-- The metric system displayed on the temperature
ENT.TemperatureMetricSystem = "C"
-- Printer temperature on spawn
ENT.TemperatureOnSpawn = 20
-- Maximum temperature of the printer
ENT.DeathTemperature = 100
-- Cooling temperature (increases with upgrades)
ENT.CoolingTemperature = 1
-- Cooling time needed (decreases with upgrades)
ENT.CoolingTime = 30
-- Heating temperature (decreasing with upgrades)
ENT.HeatingTemperature = 0.05
-- Time in ticks the printer will burn before blowing up (better leave it at that)
ENT.BurningTime = 20

-- COOLING LEVELS

ENT.CoolingLevels = {
	{LevelName = "None",     NameColor = Color(255, 255, 255, 255), CoolingMultiplier = 1,   CoolingTimeDivider = 1, HeatingDivider = 1,  MoneyToUpgrade = 0,     AutoCooling = false},
	{LevelName = "Copper",   NameColor = Color(184, 115, 51, 255),  CoolingMultiplier = 1.5, CoolingTimeDivider = 2, HeatingDivider = 3,  MoneyToUpgrade = 2000,  AutoCooling = true},
	{LevelName = "Silver",   NameColor = Color(229, 228, 226, 255), CoolingMultiplier = 2,   CoolingTimeDivider = 3, HeatingDivider = 5,  MoneyToUpgrade = 5000,  AutoCooling = true},
	{LevelName = "Gold",     NameColor = Color(255, 215, 0, 255),   CoolingMultiplier = 3,   CoolingTimeDivider = 3, HeatingDivider = 8,  MoneyToUpgrade = 7000,  AutoCooling = true},
	{LevelName = "Diamond",  NameColor = Color(185, 242, 255, 255), CoolingMultiplier = 4,   CoolingTimeDivider = 3, HeatingDivider = 12, MoneyToUpgrade = 10000, AutoCooling = true},
	{LevelName = "Ruby",     NameColor = Color(155, 17, 30, 255),   CoolingMultiplier = 6,   CoolingTimeDivider = 3, HeatingDivider = 15, MoneyToUpgrade = 15000, AutoCooling = true},
	{LevelName = "Sapphire", NameColor = Color(15, 82, 186, 255),   CoolingMultiplier = 8,   CoolingTimeDivider = 4, HeatingDivider = 20, MoneyToUpgrade = 20000, AutoCooling = true}
}

-- PRINTER BATTERY

-- Will the printer run on a battery ?
ENT.EnableBattery = true
-- Maximum battery power
ENT.MaxBatteryValue = 1000
-- Battery power on spawn
ENT.BatteryValueOnSpawn = 1000
-- Will the printer use battery when printing ?
ENT.WasteEnergyOnPrinting = true
-- How much power will the battery use when printing ?
ENT.WastingAmountOnPrinting = 0.01 
-- Will the printer use battery power when cooling ?
ENT.WasteEnergyOnCooling = true
-- How much power will the battery use when cooling ?
ENT.WastingAmountOnCooling = 0.3

What’s the directory you put this code in?

> \garrysmod\addons\darkrpmodification-master\lua\darkrp_customthings\entities.lua

[editline]30th July 2016[/editline]

This is it > \garrysmod\addons\darkrpmodification-master\lua\darkrp_customthings\entities.lua

Put it in lua/entities.