Thanks man, but I'm still doing something wrong. I get undeclared identifier errors when I compile it. I guess I'll try again tomorrow.
Here is the relevant section of my code if anybody wants to give some advice, but no big whoop either way.
p.s. What's the best way to post code on the forums?
function main()
{
screen_size.x = 800; screen_size.y = 600; screen_color.blue = 150;
mouse_mode = 4;
PANEL* pTest_pan =
{
bmap = "main.pcx";
pos_x = 250;
pos_y = 200;
button(100, 100, start_button.bmp, start_button.bmp, start_button.bmp, game, null, null);
flags = OVERLAY | SHOW;
}
}
function game()
{
pTest_pan.flags &= ~SHOW;
level_load("shooter.wmb");
while(1)
{
if(winner == 1)
draw_text("Well done! Red wins!", 10, 10, vector(50, 50, 255));
else if(winner == 2)
draw_text("Ouch! Green wins!", 10, 10, vector(50, 255, 50));
wait(1);
}
}
Last edited by elegant_mistake; 12/04/10 04:14.