Are SNPC schedules usable on normal npc's

Hey i have this code:

function find_me(ply)

local schdRunner = ai_schedule.New( "AI Random Run" )
	schdRunner:EngTask("TASK_GET_PATH_TO_ENEMY", 128) --RANDOM_NODE", 128)
	schdRunner:EngTask("TASK_RUN_PATH", 0)

for k,v in pairs(ents.FindByClass("npc_combine_s")) do
	Msg(k .. "- ")
	v:StartSchedule(schdRunner) --line 11
	Msg("Schedule Run!") 

concommand.Add(“findme”, find_me)

But when i run the findme command i’m getting this error:

1- autorun/server/dropme.lua:11: attempt to call method 'StartSchedule' (a nil value)

Which makes me think that if StartSchedule is a nil value that you cannot use it on normal npc’s. Is this correct? or what am i doing wrong?

That is correct, but since your schedule consists of engine tasks it shouldn’t be much of a problem.

Any idea why it does not work then?

Because they’re not scripted in lua.

The only reason StartSchedule isn’t available on NPCs is they don’t derive from base_ai which is where those functions are defined. Those functions are merely wrappers; you could still call them on NPCs.

EDIT: Working now thanks.