So recently, I was coding a new demo for a game I am making. I was chugging along just fine, but when I added a new sprite that was supposed to be a projectile, the program wouldn't stop crashing whenever I tried to make the character spawn the object. It brings me to a screen that says that the page is having a problem. There is an error code at the bottom that says STATUS_ACCESS_VIOLATION.
I am fairly new to all this, and have no knowledge on how to fix the issue. I tried deleting the sprite, thinking that was the cause of the error, but it keeps crashing. Does anyone have any suggestions on how I might go about fixing this?
I apologize if this is not the right place to ask for this kind of advice, this is my first time using the forum. If you need to me to do anything to help me fix the issue, please let me know. Thank you!
So the game runs fine until the character spawns a bullet, then the page crashes?
It's difficult to help you with so little information. Please post your project file or a screenshot of the event sheet. Try pressing F11 and see if there are any error messages in the console log.
Develop games in your browser. Powerful, performant & highly capable.
The game itself runs fine, but when I try to insert the code to spawn the projectile (It is labeled under the title "Sprite 4" at the moment.) that's when the program crashes. The place where I circled in blue is where I try to insert the code.
Thank you so much for helping out!
If you want to take a look at the code for yourself, here is the project file. In order to get there, open the event sheet titled "Player_Aero." Open the group with the player code, open the group titled "Light Rod," and underneath "Wayward Strike" is where the problem is occurring.
The code I insert makes the object titled "Player" spawn another object (Sprite 4) Then, when I press done, the program crashes. I hope this helps!
You shared an exported game, not the project file.
If the editor itself is crashing (not preview), then it's definitely a bug. Try to replicate it in a small demo project and report it here:
Shoot, I'm sorry, I guess I uploaded the wrong one. If you still want to try and help, I think this may be the right file. Thanks again for the advice, though! It is greatly appreciated.
Update: Not sure what I did, but it looks like the program stopped crashing. I guess all it took was a little bit of time. ¯\_(ツ)_/¯