seeyalate92 0 Posted February 9, 2021 Hello guys, i have problem with if statements. long story short: int x = Shop.count("whatever item"); if(x>240);{ log(x); } And it log 190. or 25 or whatever it wants. but how can it be executed when if statement condition isnt true?
Aeon 43 Posted February 9, 2021 Not sure if you actually have this in your code, but you have a semi-colon right after the if(x>240) which would cause undesired behavior.
Damian666 4 Posted February 26, 2021 You're probably going to feel silly but you left a semi colon after the if statement's condition. The block basically ends up being unrelated to the condition, so what you're saying is probably just caused by that.
seeyalate92 0 Author Posted April 2, 2021 ty guys. stupid mistake i dont know how can i overlook it 🤦♂️🤦♂️🤦♂️
Recommended Posts
Archived
This topic is now archived and is closed to further replies.