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: 1890
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

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

Post by pgimeno » Mon Oct 07, 2019 3:50 pm

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: 69
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 » Mon Oct 07, 2019 10:19 pm

Ok. i'm cheking again.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 22 guests