# SOLVED "reading rumble" help

**URL:** <https://discourse.codecombat.com/t/solved-reading-rumble-help/12069>\
**Category:** Uncategorized\
**Created:** [July 31, 2017, 5:27pm UTC](https://discourse.codecombat.com/t/solved-reading-rumble-help/12069 "2017-07-31T17:27:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZackAttack04](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/zackattack04/32/6659_2.png) [@ZackAttack04](https://discourse.codecombat.com/u/ZackAttack04)\
**Post date:** [July 31, 2017, 5:27pm UTC](https://discourse.codecombat.com/t/solved-reading-rumble-help/12069/1 "2017-07-31T17:27:06Z")

</div>

I need some help on reading rumble  
here is my code

```python
# Defeat all incoming ogres.

while True:
    # Find the nearest enemy.
    enemy = hero.findNearestEnemy()
    # If there is an enemy, and it is a "brawler":
    if enemy and enemy.id == "brawler":
        # Then say its name (.id) in UPPERCASE.
        name = enemy.id
        enemyId = name.toUpperCase()
        hero.say(enemyId)
    # For other enemies, just fight.
    elif enemy:
        hero.attack(enemy)
    pass

```

---

<div class="post-metadata">

**Author:** ![Hellenar](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/hellenar/32/9100_2.png) [@Hellenar](https://discourse.codecombat.com/u/Hellenar)\
**Post date:** [July 31, 2017, 7:24pm UTC](https://discourse.codecombat.com/t/solved-reading-rumble-help/12069/2 "2017-07-31T19:24:08Z")

</div>

Your hero should attack non-brawler enemies. Try comparing types:

```python
elif enemy and enemy.type != "brawler":
    hero.attack(enemy)

```

---

<div class="post-metadata">

**Author:** ![ZackAttack04](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/zackattack04/32/6659_2.png) [@ZackAttack04](https://discourse.codecombat.com/u/ZackAttack04)\
**Post date:** [July 31, 2017, 8:04pm UTC](https://discourse.codecombat.com/t/solved-reading-rumble-help/12069/3 "2017-07-31T20:04:09Z")

</div>

well i don’t attack the brawlers but i still don’t yell the names

---

<div class="post-metadata">

**Author:** ![ZackAttack04](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/zackattack04/32/6659_2.png) [@ZackAttack04](https://discourse.codecombat.com/u/ZackAttack04)\
**Post date:** [July 31, 2017, 8:07pm UTC](https://discourse.codecombat.com/t/solved-reading-rumble-help/12069/4 "2017-07-31T20:07:50Z")

</div>

I got it  
(spoiler allert)

line 7 was

```python
    if enemy and enemy.id == "brawler":

```

when it should of been

```python
    if enemy and enemy.type == "brawler":

```
