PDA

Click to See Complete Forum and Search --> : Divison by zero while setting varb


Sastraxi
Mar 11th, 2001, 10:08 PM
VB gives this error:
_______________________________
|__________________________ _ 0X|
| Run-time error: 11 - division by zero |
| |
| [continue] [END] [DEBUG] [HELP] |
|______________________________|

(sorry, felt like being artistic)

When I set this:

With PT(PTT)
X=.X <---
Y=.Y
Z=.Z
End With

The funny thing is, it only gives this error when rendering the second particle (opengl), when it goes through the first particle everything works. I have tried EVERYTHING! All of the particles are the same as the result of debugging. Can you guys help?

kedaman
Mar 11th, 2001, 10:40 PM
nice art Sas!

again, i don't have any OGL experience so i can't say, are any of those variables properties, you either assign X on a property let, .X evaluate a property get, in that case do you have the source to this part or is it part of OGL or any other component you don't have access to?
Are any of them evaluated 0?

Mar 11th, 2001, 11:38 PM
something is seriously wrong if you are getting a divide by 0 error without doing some division.

Z.

Sastraxi
Mar 12th, 2001, 09:06 AM
Yeah, neither of them are 0, and I dont think it does any division.....

What bothers me, is VB is probably "masking" the error. It's probably to do with something I gave an OGL call, and then it's in line #4 or something of that code, so it goes 4 codes down in MY prog, so it says that that is the error....

The strangest thing is, (like I said at the top), is that it works the first time around, but not the second...

Mar 12th, 2001, 12:21 PM
My suggestion is to "Debug by superstision (sp?)".
Comment some code out, run, see if it works, if not,
uncomment, comment something else, until you find
something that works. Check every scrap of info you
can find on whatever doesnt work, and study it for days
on end. It'll come to you eventually (I know =).

[edit]
More of VB's "whacked math" again =(

kedaman
Mar 12th, 2001, 04:22 PM
rightclick all values, and go for definition, and tell me where you get