You need a wait(1) before doing c_move. Put it before the while loop starts.
Otherwise the event creates an entity with a function which calls an engine function which can trigger an event right away which *COULD* in theory trigger the first event again and thus end up in an endless loop.