I use a module script of my own, and it says in the console that the ‘break’ is out of loop/or ‘continue’ not in loop. What do these functions do exactly. I know somewhat about break - wouldn’t that stop the script from running? And isn’t continue the opposite?
And also, whats a ‘loop’?
I am just asking a question here.
Why did Blender 2.8 slice the code of the BGE out of the cake? That is why I use Blender, I love to play around with the BGE as a hobby. While there is UPBGE, it is extremely experimental on Macs, and the version of Blender (2.79) compiled for it just exits upon clicking.
To define break and continue, I will first define a loop. A loop is a structure that allows nested code to be executed multiple times. A “break” inside the loop will cause the loop to exit. A “continue” causes the program to go back to the top of the closest loop, without executing any code after the continue statement.
number_list = [1,2,3,4,5]
for number in number_list:
if number == 1:
print('continue', number, ' will not be printed so we stop using the code below, and we go to the next item in the list')
continue
elif number == 4:
print('break out of the loop, ', number, ' and higher are not printed')
break
print(number)