help with a strange runtime in bgt

Yo. What's happenin'.
So I have a class in bgt which is for a cannonball. The cannonball has values of x, y, and facing. I have all this set up with a cannon, and it works. My problem, however, is this.
Note that the quotes replace brackets Because I was getting a forum error when atempting to paste the original code.
if(facing_cannonballs"i".x<=0)
{
p.play_2d("cannonballwall.ogg",me.x,me.y,facing_cannonballs"i".x,facing_cannonballs"i".y,false);
facing_cannonballs.remove_at(i);
}
else if(facing_cannonballs"i".x>=max)
{
p.play_2d("cannonballwall.ogg",me.x,me.y,facing_cannonballs"i".x,facing_cannonballs"i".y,false);
facing_cannonballs.remove_at(i);
}
I also have it do damage and it all works. All but the lines above. When it reaches a boundry, being either 0, or the max coordinates, it runtimes. I'm not sure why. I will paste the runtime text here, in case it some how sheds some light on the situation.

Call stack size: 3

File: H:\game\includes\facing_cannonball.bgt
Line: 46 (1)
Function: void facing_cannonballloop()

File: H:\game\game.bgt
Line: 61 (1)
Function: void game()

File: H:\game\game.bgt
Line: 52 (1)
Function: void main()

That's all it says. If someone could either explain why it runtimes, or paste the fixed code here, that'd be great. Also let me know if I should paste the class for the cannonball. I could do that as well.
Thanks for any help in advance

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : audiogame via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ironcross32 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : rory-games via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector

Reply via email to