I modified it. It works now. The player_distance variable needed its x, y, z parameters to be defined by vec_set().
Thanks for the code Burning Devil.

I hope you don't mind me using it in my game.
var player_distance;//make a varible for how fast the player walks
action Auto_Walk//Give this action to your player
{
while(1) // use this to update your movement, without it, he will not move
{
vec_set(player_distance, vector(2,4, 0));//Assign how fast he will walk, by replacing 0
ent_move(player_distance, nullvector);//ent_move is the instruction to make him move foward
MY.animationframe+= 8 * time;//how fast the walk animation will be
ent_animate(my,"walk",MY.animationframe,ANM_CYCLE);//this plays the walk anim
wait(1); //always us this wait instruction after while(), to avoid errors
}
}