☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> Cannot Convert Int To Boolean Error
Add Reply
New Topic
New Poll
Views: 186
Replies: 4
Track Topic
GetSpanked
Member
Posts: 1,081
Joined: Aug 25 2013
Gold
:
Locked
Trader:
Scammer
#1
Sep 18 2013 02:39pm
why can't i have this statment?
while(turnTotalTwo = 0){
// code
}
irimi
Member
Posts: 4,605
Joined: Sep 15 2011
Gold
:
9,464.00
#2
Sep 18 2013 04:18pm
because that's an assignment statement inside your while conditional
irimi
Member
Posts: 4,605
Joined: Sep 15 2011
Gold
:
9,464.00
#3
Sep 18 2013 04:19pm
maybe you should just start 1 thread for all of your really stupid questions instead if making a new thread for every stupid question. i can do that for you if you don't know how.
This post was edited by irimi on Sep 18 2013 04:19pm
Civill
Member
Posts: 859
Joined: Jul 2 2008
Gold
:
27.00
#4
Sep 18 2013 04:55pm
You're assigning the value instead of comparing it.
See:
http://www.leepoint.net/notes-java/data/expressions/20comparison.html
This post was edited by Civill on Sep 18 2013 05:02pm
labatymo
Member
Posts: 2,757
Joined: Nov 26 2007
Gold
:
1,214.81
#5
Sep 18 2013 07:18pm
use == instead of =
Go Back To
Programming & Development
Topic List
Add Reply
New Topic
New Poll
© 2003-2026 d2jsp
Contact