• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Loops crash game

C

Collin Carroll

Guest
I'm not sure what to do here, also i'm using DnD.


Picture of code:

 

TsukaYuriko

☄️
Forum Staff
Moderator
The first thing to do is not to post pictures of code, especially not pictures which do not display when embedded and ask for a password when viewed directly. (Your image host seems to require to be logged into your account to view the image. But let that be of no concern to you, as you are not supposed to post pictures of code anyway.)

Please post the code as text.
 

Yal

🐧 *penguin noises*
GMC Elder
If your loop crashes the game, the most likely cause it that it doesn't end. Double-check the condition to end the loop. (Try adding a show_debug_message() inside the loop to see if it actually does anything - if you get a million printouts, you've confirmed it!)
 
C

Collin Carroll

Guest
It was the problem, but the loop only goes once (I'm using jump to point to make it infinity go right.) If I use "show debug message" it still only activates one time

I am also using if variable "move" is equal to 1, break. It will never be equal to 1.
 

TheouAegis

Member
If it will never be 1, why break when it's 1?

just post your actual code. If you can't fix it on your own, show us the code and we will try to tell you what's wrong with it.
 
Top