Just wanna follow up with this as I encountered it. Most might already know, but it could help a few
Before adding an NPC to a grid as Chaos mentioned, you have to first add the NPC to the database (if doing it entirely within the game).
Spawn your NPC, then #npcspawn create while targeting the NPC. Then do a #repop , and you can then #gassign ###