Inside the braces.
What happens is: the while loop happens infinitely, without giving other functions/rendering/everything else a chance to happen, so "wait (1);" tells the engine to wait until the next frame before continuing.
Lastly (I think), I just realised, you're using a view entity, which I believe can't use c_move and the like. Use ent_create instead to put your entity in the level.
Jibb