Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Express causes crash

Author
Message
Psycho Psam
16
Years of Service
User Offline
Joined: 3rd Apr 2008
Location: Western Australia
Posted: 20th May 2012 13:47 Edited at: 20th May 2012 14:48
I'm making bullets and when I run this code it works fine.


gBulletArray[ gBulletCount ].x# = playerX + cameraX#
gBulletArray[ gBulletCount ].y# = playerY + cameraY#


But I want to offset it the bullet position so I add these numbers and it crashes when I shoot the 3rd bullet every time. What is this?

gBulletArray[ gBulletCount ].x# = playerX + cameraX# + 85.0
gBulletArray[ gBulletCount ].y# = playerY + cameraY# + 25.0
Psycho Psam
16
Years of Service
User Offline
Joined: 3rd Apr 2008
Location: Western Australia
Posted: 21st May 2012 03:03
Well here's my solution anyway - put the offsets into the type first. But I think the code above may have exposed a bug in AGK.

In the main file...


and in firing.agc

Login to post a reply

Server time is: 2024-11-23 14:47:07
Your offset time is: 2024-11-23 14:47:07