Sorry I just need this last thing. Car dealer error

util.AddNetworkString( ‘cars_senddata’ )
util.AddNetworkString( ‘BuyCar’ )
util.AddNetworkString( ‘Sell’ )
util.AddNetworkString( ‘Cannot’ )
util.AddNetworkString( ‘SpawnCar’ )
util.AddNetworkString( ‘open_car_shop’ )
util.AddNetworkString( ‘car_away’ )

function CarShop()

for _,v in pairs(NPCSHOP.SpawnPoint[game.GetMap()]) do
local npc = ents.Create(“npc_car”)
npc:SetModel(NPCSHOP.Model)
npc:SetPos(v.Pos)
npc:SetAngles(v.Ang)
npc:DropToFloor()
npc:Spawn()

local bubble = ents.Create("npc_bubble")
	bubble:SetPos(npc:GetPos() + Vector(0,0,90))
	bubble:Spawn()

end

end
hook.Add(“InitPostEntity”,“CarShop”,CarShop)

//Utilizes darkrp’s notify
local function Notify(ply, text)
if not IsValid(ply) then return end
umsg.Start("_Notify", ply)
umsg.String(text)
umsg.Short(0)
umsg.Long(4)
umsg.End()
end

hook.Add(“EntityTakeDamage”,“NPCisInvincible”,function(target,dmg)
if target:IsNPC() and target:GetClass() == “npc_car” then
dmg:ScaleDamage(0)
end
end)

local function SaveCar()
local str = util.TableToJSON(vehicle.PlyCars)
file.Write( “boowman_cardealer.txt”,str)
end

local function LoadCar()
local str = file.Read( “boowman_cardealer.txt”, “DATA”) or “
vehicle.PlyCars = util.JSONToTable(str)
end

LoadCar()

[ERROR] addons/darkrpmodification-master/lua/shop/sv_npc.lua:12: bad argument #1
to ‘pairs’ (table expected, got nil)

  1. pairs - [C]:-1
  2. fn - addons/darkrpmodification-master/lua/shop/sv_npc.lua:12
    3. unknown - addons/ulib/lua/ulib/shared/hook.lua:183

Do you have a spawn point set?

/-----------------------------------------
Here are the NPC Details
*-----------------------------------------*/

NPCSHOP = NPCSHOP or {}
NPCSHOP.CarSpawn = {}
NPCSHOP.SpawnPoint = {}

NPCSHOP.Name = “Car Name here”
NPCSHOP.ID = 2
NPCSHOP.Model = “models/Humans/Group01/Male_04.mdl”

NPCSHOP.SpawnPoint[“rp_bangclaw”] = {
{
Pos = Vector(885.276367, -56.722973, -79.968750),
Ang = Angle(0,-90,0)
},
}

// Player Question
NPCSHOP.Question_1 = “Can you please take my car away.”
NPCSHOP.Question_2 = “Hey! I’m looking for a new car.”
NPCSHOP.Question_3 = “You can’t help me. Nobody can help me.”

// NPC Answers
NPCSHOP.Answer_1 = “Yeah sure. It should be away now.”
NPCSHOP.Answer_2 = “Here are all the cars we currently have.”
NPCSHOP.Answer_3 = “”

NPCSHOP.CarSpawn[“gm_construct”] = {
{
Pos = Vector(712.632751, -324.536713, -79.968750),
Ang = Angle(0,-90,0)
},
}

Replace


for _,v in pairs(NPCSHOP.SpawnPoint[game.GetMap()]) do

with


for _,v in pairs(NPCSHOP.SpawnPoint[string.lower(game.GetMap())]) do