forums

TNT Basic Forums > Programming Q&A
Invisible menu
< Last Thread     Next Thread >
Author
Thread        Post A Reply

09-15-2003 19:06

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Hi,
I'm making a freeware 'toy', not my main project, but fun nonetheless,but the menu is not displaying, and therefore, the animations cannot be accessed. The button co-ords look OK to me and everything works fine leaving out the menu. I've included the entire Menu() below, but the rest of it is a bit too long for me to post here, so if anyone would like to download it:
http://uk.geocities.com/Downloads/Stick_person_animation.sit
it's a 234k .sit file because of all the graphics. The fixed version will be posted at the same address.

thanks,
Mark_667


Procedure Menu()
load images 131 'Buttons image bank
set image bank 0,132
new button 0,300,100,3,3,3,128 'Headspin
new button 1,300,200,2,2,2,128 'Walk
new button 2,300,300,1,1,1,128 'Handstand
new button 3,300,400,0,0,0,128 'Bungee
new button 4,300,500,4,4,4,128 'Quit
draw frame
wait button click

if button click = 0
unload images 131
Headspin()
else if button click = 1
unload images 131
Walk()
else if button click = 2
unload images 131
Handstand()
else if button click = 3
unload images 131
Bungee()
else if button click = 4
End
end if

clear buttons
end proc

09-15-2003 23:57

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

the link doesn't work so I'll only give you basic help.

write something like print "Entered menu procedure" right after the procedure starts. If the message doesn't pop-up it'll mean the procedure is never called.

make sure you have images in bank 131, and make sure tey're loaded ( I think that's the one you used? )

I can't do much unless I have the file. Good luck with you project :)

09-16-2003 10:51

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Sorry about the link, here's the parent directory:
http://uk.geocities.com/madmarkuk2003/Downloads/
and the file itself:
http://uk.geocities.com/madmarkuk2003/Downloads/Stick_person_animation.sit

And yes, the proc is executing, there are no runtime errors and the image bank does have buttons in it. Any more ideas appreciated :)

09-16-2003 22:48

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

I can't believe no one saw it before ( including myself :) !!! Look closely at the following lines:

load images 131
new button 0,300,100,3,3,3,128
new button 1,300,200,2,2,2,128
new button 2,300,300,1,1,1,128
new button 3,300,400,0,0,0,128
new button 4,300,500,4,4,4,128

Do you need another clue? Look at the last argument of the new button statement.

Ah, I think you found out ;) good luck!

09-17-2003 10:50

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

D'oh! Even I've spotted it now-thanks Matthew. Maybe TNT should have some kind of de-bugging routine to catch things like this (trying to reference an inactive image bank), for the next version; just for newbies :) what do you think?

09-17-2003 23:39

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

That'd be great. But programming is indeed a lot of frustation. Some better and a lot more expensive software than TNT offer much less comprhensible error messages ( thought not all ). Everything comes with experience, ( and hours spent trying to debug that rudy program! :)

But yes a debugger could be cool.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.