Hi,
i cant find the error in this!

this is my start screen:
Code:
// don't forget to include npc1.wdl
// attach action npc1 to your non playing character
function npc_talks(); // function prototype
string npc1_str = "Yeah, a good day to you too";
string npc2_str = "No, I'm not interested in buying used 286 computers";
string npc3_str = "I can't talk to you - I have to clean my helmet";
string npc4_str = "I'm not talking to you from now on";
string npc5_str = "Hm hm hm...";
text npc_txt
{
layer = 22;
pos_x = 0;
pos_y = 0;
font = standard_font;
strings = 5; // 5 "lines" for this npc
string = null;
flags = d3d;
}
action npc1
{
clip_size = 0; // show all the triangles for all the models
while (1)
{
temp.x = player.x - my.x;
temp.y = player.y - my.y;
temp.z = 0;
vec_to_angle(my.pan, temp); // rotate towards the player
ent_cycle("stand",my.skill9);
my.skill9 += 1.5 * time;
if (my.skill9 >= 100) {my.skill9 = 0;} // play "stand" animation
my.skill10 = vec_dist(my.x, player.x);
if (my.skill10 < 200) // player comes closer than 200 quants to the npc
{
if (my.skill11 == 0)
{
my.skill11 = 1; // the npc says a single "line" (fake exclusive_global)
npc_talks();
}
}
else
{
my.skill11 = 0;
}
wait (1);
}
}
function npc_talks()
{
if (my.skill12 < 5) {my.skill12 += 1;} // strings from 0..4 = 5 strings are allowed
if (my.skill12 == 1) {npc_txt.string = npc1_str;}
if (my.skill12 == 2) {npc_txt.string = npc2_str;}
if (my.skill12 == 3) {npc_txt.string = npc3_str;}
if (my.skill12 == 4) {npc_txt.string = npc4_str;}
if (my.skill12 == 5) {npc_txt.string = npc5_str;}
npc_txt.visible = on;
waitt (48);
npc_txt.visible = off;
}
Its a tut from AUM!
Thanks