hello i am trying to create a bargraph to display a var with the window panel element and it shows it on screen but the window bar starts at dx value and does not change according to the var assigned to it . any ideas why? i am using a8 free lite c the bmap image is 32 by 32 pcx





here is the code



#include <acknex.h>
#include <default.c>



var players_health =100;



PANEL* bars_pan =
{

pos_x = 0;
pos_y = 8;
layer = 1;
window(2,2,200,10,"bargreen.pcx",players_health,0);
flags = SHOW;
}






function main()
{
video_screen = 1;
video_mode = 8;
level_load ("");


while (1)
{

if (key_1) players_health += 2 * time_step;

if (key_2) players_health -= 2 * time_step;

wait(1);
}
}