Collisions Bug???

Blitz3D Forums/Blitz3D Programming/Collisions Bug???

Jeremy Alessi(Posted 2003) [#1]
I'm going back and trying to get True-Vol bug free and running on Blitz 1.83. The problem is that since 1.80 there is something different with collisions. Perhaps it has to do with the 1-999 limit (although that doesn't really make sense.) Look at this real quick:

;****** SET COLLISIONS ***************************************************
BODY=1
SCENE=2
POWER=3
HAZZARD=4
PARTICLE_HAZZARD=5
OPPOSING_SPECIAL=6
PLAYER_SPECIAL=7
OPPOSING_BODY=8
NOTHING=9
ENEMY=10
PLANE_C=11
Collisions(BODY,SCENE,2,3)
Collisions(BODY,POWER,2,3)
Collisions(BODY,HAZZARD,2,3)
Collisions(BODY,PARTICLE_HAZZARD,1,3)
Collisions(BODY,OPPOSING_BODY,2,3)
Collisions(BODY,OPPOSING_SPECIAL,2,3)

Collisions(BODY,PLANE_C,2,3) ;this line gets highlighted by the debugger but only after I've already loaded and played once and then go to play a second time.  I manually clear all entities as well as use clearcollisions() and clearworld() after quitting the first time.  The graphics mode is also switched in between games since it goes back to the interface.  This is the first use of PLANE_C which is only my eleventh collision type.  So for some reason it picks up on this collision type but it shouldn't if collision type ID's go to 999?

Collisions(OPPOSING_SPECIAL,BODY,2,3)
Collisions(PLAYER_SPECIAL,SCENE,2,3)
Collisions(NOTHING,PLANE_C,2,3)
Collisions(PLAYER,PLANE_C,2,3)
Collisions(PLAYER_SPECIAL,OPPOSING_SPECIAL,2,3)
Collisions(OPPOSING_SPECIAL,PLAYER_SPECIAL,2,3)
Collisions(BODY,PLAYER_SPECIAL,2,3)
Collisions(BODY,ENEMY,2,3)
Collisions(ENEMY,BODY,2,3)
Collisions(ENEMY,SCENE,2,3)
Collisions(PLAYER_SPECIAL,ENEMY,2,3)
;*************************************************************************


Does anyone have a clue?


jhocking(Posted 2003) [#2]
Please describe your problem. Is it simply failing to compile or is it a runtime error? What exactly is the error message you get?

EDIT: I didn't see that line of comment (although it still doesn't give us the error message.) It would be nice if you described the problem in the text of your post since I usually don't deal with code until I know what I'm trying to do. Also, that comment line is stretching out the page so that I have to scroll right to read stuff.

At any rate, without knowing the specific error message this seems pretty mysterious to me. Possibly a bug to report.


Jeremy Alessi(Posted 2003) [#3]
I just says "Memory Access Violation" and then highlights that line.

Also, when I typed the post all the comments were on like 4-5 lines. I don't know why it went off the page?


jhocking(Posted 2003) [#4]
If you haven't already I say post this to Bug Reports. If it is a bug hopefully it'll be fixed in the next update and if it isn't then hopefully someone will figure out the problem for you. For whatever reason nobody seems to be helping you here.


DJWoodgate(Posted 2003) [#5]
You could also consider the possibility that the debugger is confused and is not highlighting the correct line, so make sure thats really where the program terminates.


SSS(Posted 2003) [#6]
btw, are you reseting the values for the collisions? try making them constant


Jeremy Alessi(Posted 2003) [#7]
I do reset the values everytime a new level is loaded up.


Jeremy Alessi(Posted 2003) [#8]
Hmmm...if I take away the 11th collision type it runs for the second time. I don't quite get this. It runs the first time with all 11 collision types but then it doesn't like the 11th one the second time running.