#Bool become active
1 messages · Page 1 of 1 (latest)
but i have set the minimum to 0.25 and at the start the numeber is 2/500 that is 0.04
@thin mango
I asked you if you checked the condition, use a Debug statement to confirm if it runs or not
There you go
yeah but it makes no sense
at the start the sick are 2
and the population is 502
i have putted percentualeMAMDS to be 1
so 2/502 > 1 ?
this is no sense
seems like it activate if the second if is true
no just kiddinh
g
Have you used Debugs to check, perhaps also log some values so you can see them
That is not what I asked
i have also loged them but they are the same
Debug.Log("Rimossi Totali : "+rimossiTotali);
Debug.Log("Popolazione : "+popolazioneTotale);
Debug.Log("Sani Totali : "+saniTotali);
Debug.Log("Malati Totali : "+malatiTotali);
Debug.Log("Immuni Totali : "+immuniTotali);
Debug.Log("Morti Totali : "+mortiTotali);
i have this at the end
Unless this bool is being changed elsewhere, that condition is true and makes the bool true
mh
I don't know why because I don't know the true values, but that is the issue
Actually, I do know why it just hit me
Oh no, you just put the braces at the end of lines
the braces are the { ?
Yeah I thought you hadn't used braces on the second if
so you have found the problem ? sorry if i seem stupid but i am not english so sometimes i don0t understand everything
No I've no idea
What are the values of malatiTotali, popolazioneTotale, and percentualeMAMDS in the Inspector?
Wait, in the first example you're diving 2 by 0?
i calculate the population after doing that
Yes you are, 2/0 is what?
so i just need to invert the order
yes yes
this is after
that
so i just need to put this before
and is solved
Give it a go yeah