d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Cannot Convert Int To Boolean Error
Add Reply New Topic New Poll
Member
Posts: 1,081
Joined: Aug 25 2013
Gold: Locked
Trader: Scammer
Sep 18 2013 02:39pm
why can't i have this statment?

while(turnTotalTwo = 0){
// code
}
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
Sep 18 2013 04:18pm
because that's an assignment statement inside your while conditional
Member
Posts: 4,605
Joined: Sep 15 2011
Gold: 9,464.00
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
Member
Posts: 859
Joined: Jul 2 2008
Gold: 27.00
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
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Sep 18 2013 07:18pm
use == instead of =
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll