As you might guess, I'm _completely_ new to this, coming from C. I thought I'd attempt something more complex and structured than the cube sample in the manual, but this just exits without an error message, and without displaying anything, and I don't get why. I'm hoping someone more knowledgeable can help...
#constant CUBE_NUM 0
up_ang = 0.0;
left_ang = 0.0;
`********************************************************
function startup
`set some basic options
sync on;
sync rate 60;
set text size 16;
set display mode 640, 480, 32;
endfunction;
`********************************************************
function animate(left_pressed as boolean, up_pressed as boolean)
if left_pressed
left_ang = left_ang + 0.1;
text 16,16,"left pressed";
endif
if up_pressed
up_ang = up_ang + 0.1;
text 16,32,"up pressed";
endif
rotate object CUBE_NUM, left_ang, up_ang, 0.0;
endfunction;
`********************************************************
`main
left_key = 0;
up_key = 0;
startup();
make object cube CUBE_NUM, 100;
while not (escapekey())
left_key = LEFTKEY();
up_key = UPKEY();
animate(left_key,up_key);
sync;
endwhile
It compiles, but when run, it simply exits. I've verified that the manual's cube example produces a working .exe, and I know for a fact that my video card is capable of the requested mode.
I've also tried replacing "while not (escapekey())" with "while(1)" and that didn't seem to help...
Any ideas?