var healthplayer = 150;
...
PANEL* first_pan =
{
pos_x = 1077; //It works, but only for one screen resolution!
pos_y = 919; //The same here!
//Fix: Function which updates the position
bmap = "healthbarframe_bmp"; //Forgot quotation marks
window (1080, 919, 65, 25, "healthbar.bmp", healthplayer, 0);
//Can be used directly without new panel
digits (1100, 900, 3, "Arial#15b", 0.667, healthplayer);
//Same here
flags = SHOW;
//Refresh isn't needed anymore
layer = 1;
}
//Your snippet:
if (healthplayer < 150)
healthplayer = minv(150,healthplayer + 0.03 * time_step); //Timestep needed because of different frame rates!