#Why isn't this array test working

13 messages · Page 1 of 1 (latest)

patent pasture
#

Hello, this should be a simple method but for some reason this is allowing zero's and anythinig above 31 to add something in the array. I have no idea what i'm doing wrong i've tried every variety of this if statement and nothing is working.

eternal falconBOT
#

This post has been reserved for your question.

Hey @patent pasture! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

patent pasture
#

Why isn't this array test working

feral holly
#

might be something with that months can have 28, 29, 30 and 31 days. So I guess try with all those numbers and see if it works

#

also I assume you can't see the test, nor the month?

patent pasture
#

i checked

#

the month right now is january

#

so 31 is the maximum

#

I have no idea why the if statement is allowing for 0

#

nevermind, i did actually try setting it to being compared to days in month and it worked, thanks

eternal falconBOT