## How can we help you today?

Start a new topic
Answered

## Error in the Heartstone tutorial

Hey guys, i'm checking your heartstone tutorial and I found some things illogical:

In the part of the Proces Rank Module found this expresion:

```if(currentRank &gt;= 25 &amp;&amp; currentRank &lt;= 21 ){
...
}```

that means in this:

```if(currentRank >= 25 && currentRank <= 21 ){
...
}```

how the f... one variable can be GREATER THAN 25 and(&&) at the same time LOWER THAN 21?

I'm sorry if I lost in the code but this has not sense for me...

Can anyone explainme this?

Regards!

Best Answer

Hi Daniel,

The comment above that line of code in the guide is "//Check for rank range" so it's likely that the <= and >= are just mixed up here. Checking if the rank is between 21 and 25 makes more sense here.

//if the rank is between 21 & 25

if(currentRank <= 25 && currentRank >= 21 )

If you have any further questions just let me know.

Thanks,

Liam

1 Comment

Answer

Hi Daniel,

The comment above that line of code in the guide is "//Check for rank range" so it's likely that the <= and >= are just mixed up here. Checking if the rank is between 21 and 25 makes more sense here.

//if the rank is between 21 & 25

if(currentRank <= 25 && currentRank >= 21 )

If you have any further questions just let me know.

Thanks,

Liam

Login to post a comment 