seeyalate92 0 Share 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? Link to comment Share on other sites More sharing options...
Aeon 42 Share 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. yeeter01 1 Link to comment Share on other sites More sharing options...
Damian666 4 Share Posted February 26, 2021 (edited) 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. Edited February 26, 2021 by Damian666 Link to comment Share on other sites More sharing options...
seeyalate92 0 Author Share Posted April 2, 2021 ty guys. stupid mistake i dont know how can i overlook it 🤦♂️🤦♂️🤦♂️ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now