Page 3 of 3

Re: The big problem with loops running at the same time, about destroying objects and asking about how loops work

Posted: Mon Oct 07, 2019 3:50 pm
by pgimeno
ilovelove2019 wrote: Mon Oct 07, 2019 12:53 pm I mean if I use guard. When I threw the cherry bombs at the frogs, they didn't take any damage. The code after putting into guard it does not work. I do not understand why?
If the general behaviour changes as a result of adding a guard against a nil value that causes a crash, even in situations when you would not get a crash, the only reasonable assumption is that you're not setting up the guard correctly.

If something goes wrong only in the exact same situation where the crash would otherwise happen, then the guard would not be the solution, But judging by the symptoms, at least in the case I have analysed, guarding against a nil value should prevent problems.

Re: The big problem with loops running at the same time, about destroying objects and asking about how loops work

Posted: Mon Oct 07, 2019 10:19 pm
by ilovelove2019
Ok. i'm cheking again.