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

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
pgimeno
Party member
Posts: 3656
Joined: Sun Oct 18, 2015 2:58 pm

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

Post 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.
ilovelove2019
Citizen
Posts: 78
Joined: Wed Sep 11, 2019 10:38 am

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

Post by ilovelove2019 »

Ok. i'm cheking again.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests