forums

TNT Basic Forums > Bugs!
Spectacular crash
< Last Thread     Next Thread >
Author
Thread        Post A Reply

11-11-2003 12:59

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

I have not the first idea why this particular piece of code messes up so badly.

In os x running the following occasionally quits TNT basic and dumps me back in hieroglyph, but once or twice it has given me the very rare "you need to restart your computer" os X fatal error dialog. I am on a G4 800 imac running os 10.2.0.

Begin segment:

graphics mode hardware 800,600
load images 128
load images 99
draw picture 128,0,0
draw frame
float shift=Calculate Angle(400,300 to 0,0)
int s
float spriterot

int mask = make colour (50,50,50)
copy image 0,0,800,600,mask,false to 000,99

for s = 0 to 89
spriterot=s^2
sprite 0,cos(spriterot+shift)*(500),sin(spriterot+shift)*(500),0

set sprite rotation 0,spriterot
set sprite x scale 0,1+spriterot/100
set sprite y scale 0,1+spriterot/100
set sprite transparency 0,87
paste sprite 0
sprite off 0

draw frame
next

The above works fine if you replace the

sprite 0,cos(spriterot+shift)*(500),sin(spriterot+shift)*(500),0

with

sprite 0,0,0,0

The thing only crashes upon reaching it's last frame, otherwise it runs as well as anything else I have thrown together. It is supposed to spin an image around an axis, blurring it all the time to create a vortex appearance. The trigonometry is supposed to center it around 400,300, but it instead looks ridiculous (that's probably my fault...). This is an obscure but pretty spectacular (no offence) bug. Good luck, I'm well on my way with the rpg engine.

-wyvern

11-11-2003 16:54

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

bug reports code too long...

Dont you manage to write a shorter code to make the thing crash? I mean, only 10 lines? This is a thing that happens often.

11-11-2003 20:04

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

Sorry...

11-11-2003 23:52

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

If you use the bug reporter program, it will gather up things like the crash log from TNT Basic, which will tell me exactly where (and hopefully why) TNT Basic crashed. This will give me a clue of how to fix it.

Thanks,

Mark

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.