Yes thats because you are using C-Script and my code is Lite-C.
Try this one instead:
Code:
action enemy_act
{
  var my_pos[3];
  string my_health;

  while(me)
  {
    if(vec_for_screen(my.x,camera))
    {
      vec_set(my_pos,my.x);
      my_pos.z += 50; // z-offset
      vec_to_screen(my_pos,camera);
      str_for_num(my_health,my.skill22); // replace my.skill22 with your health skill
      draw_text(my_health,my_pos.x,my_pos.y,vector(255,255,255));
    }
    wait(1);
  }
}