My friend's game keeps breaking down

When I tried to help him with like making him a thing for getting cash automatically I ran the game and when I edited the variable for cash, I bought the thing needed for it, but then the game basically crashed when I went back in the main game or it’s just that my pc is just being weird (also his loop thing for automatic cash won’t work).

(it’s a clicker game)

Code.org

Wow, your friend spent a lot of time on this! One thing I notice is that the function that is called on line 2 has a yellow triangle next to it. The function he created is called draw and should be in the green box. See if that works.

The function is called noSmooth(); which just makes the game have higher quality and I did try that, but it did not work.

@pluto,

Although noSmooth( ) is a function in the version of javascript that Game Lab is built on, not all PS5 functions are supported in Game Lab, so that could be why the yellow triangle is showing up. I have seen other functions throw that warning, but still work, so it’s possible it is working even though the yellow triangle seems to indicate otherwise.

As for your other question, I’m not 100% sure what you are asking. Is the version you sent us his version or your version with the edited cash variable. If it is your version, we can perhaps look at it closer if you tell us exactly how to recreate the error, but I’m not completely understanding what you did to make the game crash.

Good luck!

Mike

I made a video so you could fix it easier:

Vimeo

@pluto,

It looks like you may have removed the video. Hopefully that means you figured it out. We are happy to look at sections of code you are working on, but we will generally just make suggestions if we can find ways to improve the functionality of your code. Sometimes, when the project is long or somewhat complicated, we can’t always readily find the mistake.

Our main goal as facilitators / moderators is to help students and teachers with projects relating to the code.org curriculum. The tools can be used to go much further than that, but we aren’t always able to debug every project that someone could create with the tools provided by code.org.

If you are still struggling, though, we don’t mind taking a quick look.

thanks,

Mike

I didn’t remove it? I just didn’t do anything to it after I posted it.

OK. The link says that there is no video at that link when you click on it, so if it is there, maybe it needs to be published. I’m not sure since I’m not a big vimeo user.

Mike