Trouble with creating NPCs for Gmod 13 + Steam Workshop Upload questions

Hello, I’m having a but trouble with my npc files and it seems to be fine but it STILL wont show up on the NPC spawn list. I was brought up with a few posts on this website and decided to make an account and ask this, thanks for reading and I’m hoping for a solution
or maybe its just my lua writing skills :frowning:

Named: .lua
Type: Txt File

local Category = “Halo CE Marines”

local NPC = { Name = “Armored Marine”,
Class = “npc_citizen”,
Model = “models/marine.mdl”,
Health = “100”,
KeyValues = { citizentype = 4 },
Weapons = { “weapons_ar2” },
Category = Category }

list.Set( “NPC”, “npc_amored_marine”, NPC )

And yes, I have all models and materials files set up, I didn’t make it I just want to convert it to a NPC. This is for GMOD 13 on STEAM I bought.

[editline]10th June 2014[/editline]

Also how would I be able to upload this for the workshop?
Also if you want to have an easier chat just add me on steam, my ID is cjboyvideogames

is the lua in addonname/lua/autorun?

Yes, it is in myfilename/lua/autorun
I just can’t figure out why I can’t see my NPC on the NPC Spawn list…


local NPC = { Name = "Armored Marine", 

need a }?

That might be just that :o

The bracket at the end of Category = Category should already do that. Here’s a slightly cleaner version of the same script.



local Category = "Halo CE Marines"

local NPC = 
{
Name = "Armored Marine",
Class = "npc_citizen",
Model = "models/marine.mdl",
Health = "100",
KeyValues = { citizentype = 4 },
Weapons = { "weapons_ar2" },
Category = Category
}

list.Set( "NPC", "npc_amored_marine", NPC )