Nextbot problem - "cannot resume dead coroutine"

-Because cloudflare doesn’t want to let me pass their captcha when I have long code, I’ll just leave a link to the code here-

Every once in a while, I happen to get this error:

NextBot [42][player_shotgunner]error: cannot resume dead coroutine

What’s wrong? What do I do to fix it?

Does your bot break when the error pops up?

I feel like that coroutine.yield in your ChaseEnemy function might be the problem.

Yep. The bot stops working entirely.

[editline]6th August 2015[/editline]

Okay… Now it’s entirely just crashing my game when I get the error. And yes, after removing coroutine.yield it’s still happening…

Add me on steam, we may be able to work this out: