Ok here are the relevant parts of the code:


while (ZL<6) // part of the main level function
if ((camera.x > 5200) && (camera.y > 2160) && Zielerreicht == 0)
{
ZL +=1; // Levelzähler geht hoch

speichern();
Zielerreicht = 1;

} // Am Ende des Levels angekommen
if (Zielerreicht == 1)
{

restart();}
}

function restart()
{
vec_set(player.x, vector(0,608,100));
var S1=0, S2=0, S3=0, S4=0, S5=0, S6=0, S7=0, S8=0, SL=0;
var Z1=0, Z2=0, Z3=0, Z4=0, Z5=0, Z6=0, Z7=0, Z8=0, Zielerreicht = 0;
}

And I took the action for the Player "walk" from the tutorial;) :

action wizard_walk()
{
camera_follow(me);




while (1)
{
// state 1: walking ////////////////////////////////////////////

// rotate the entity with the arrow keys
my.pan += (key_cul-key_cur)*5*time_step;

//

// move the entity forward/backward with the arrow keys
var distance = (key_cuu-key_cud)*25*time_step; // auf 5 zurückstellen, wenn programmierung fertig
c_move(me, vector(distance,0,0), NULL, GLIDE);


// adjust entity to the ground height, using a downwards trace
c_trace(my.x,vector(my.x,my.y,my.z-1000),IGNORE_ME | IGNORE_PASSABLE);
my.z = 100; // always place player's feet on the ground
wait (1);

}
}

So yes - I guess I didn't initialise the players position - he just starts there, where I set him on the map...

I would be really greatful for any help, as I am a total beginner...