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 43 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. Link to comment Share on other sites More sharing options...
Damian666 4 Share 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. 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
Archived
This topic is now archived and is closed to further replies.