Computer Science Canada

Really Easy Question

Author:  Aclimator [ Tue Feb 08, 2011 2:33 pm ]
Post subject:  Really Easy Question

I have some code:

if (gp.getRank() >= guild.getPerm("use chest"))
canBuild = true;

if I change it to this:

if (gp.getRank() >= or <= guild.getPerm("use chest"))
canBuild = true;

Will it still work?

I added "or <=", so pretty much any value, and canBuild will equal true.

Is that right? If not, can someone just fix it really quick?

Author:  Tony [ Tue Feb 08, 2011 2:37 pm ]
Post subject:  RE:Really Easy Question

what does the expression of
code:

gp.getRank() >=

mean?

Author:  Aclimator [ Tue Feb 08, 2011 2:57 pm ]
Post subject:  RE:Really Easy Question

Im pretty new to java, and this is someone elses code.

But what I do know is that the expression is getting a value from a text file. If that value is greater or equal to the value from another txt file, then

canBuild = true.

I just need a way to make canBuild always true.

Author:  Aclimator [ Tue Feb 08, 2011 3:16 pm ]
Post subject:  RE:Really Easy Question

Any help?

Author:  Sur_real [ Tue Feb 08, 2011 5:13 pm ]
Post subject:  RE:Really Easy Question

if you want canBuild to be always true, why would you need to have an if statement?


: