NextBot Error: Yield across C-call boundary? nextbot error.

[ERROR] gamemodes/base/entities/entities/base_nextbot/sv_nextbot.lua:290: attempt to yield across C-call boundary.


function ENT:Think()
    self:MoveToPos( player.GetAll()[1]:GetPos())
end

inb4 dont call that every think. its a test.

Why do i get that error? can i only call MoveToPos in the behavior code?

you can only call it within the behavior thread, yes.

Is there another function where i can dynamically update the bots movement goal? what if i want him to stop moving if he got shot or something?

[editline]28th May 2013[/editline]

NVM figured it out. Close this thing or just use it as a storage room for all of our extra boxes.