So, if I understand correctly, your Hero collects resource when he gets stuck, and when the 'me' is an Enemy, Resource or Hero it should do something (Isn't 'me' always the Hero?). When 'me' is the Hero the entity that is the Resource should be removed, right?
So everytime Hero gets blocked the resources should be removed. However, if they are removed once they cannot be removed again, so there is already a flaw in your script. I don't know who 'Resource' is, but I take it that there is only one resource then, and no walls?
I think you need to throw this away and rewrite it. You better use something else than c_move to see if you collided with a resource entity:
from player -> c_scan (good solution)
from player -> linkedlist or array of all resources -> loop through all resources -> vec_dist (good solution)
from individual resources -> vec_dist (average to good solution)
ent_next -> vec_dist (bad solution)
The method to use depends on the context of your "model". I think that an array of resources that you loop through and check the vec_dist between resource and player would be easy enough to implement and would work well.
You can try c_scan too, but I personally don't like that function, makes me feel I am not in control of what happens

. Take whatever suits you.