# Loud Quietness C++ help please

**URL:** <https://discourse.codecombat.com/t/loud-quietness-c-help-please/33702>\
**Category:** Level Help\
**Created:** [August 30, 2022, 6:49pm UTC](https://discourse.codecombat.com/t/loud-quietness-c-help-please/33702 "2022-08-30T18:49:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garrett\_P](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/garrett_p/32/30490_2.png) [@Garrett\_P](https://discourse.codecombat.com/u/Garrett_P)\
**Post date:** [August 30, 2022, 6:49pm UTC](https://discourse.codecombat.com/t/loud-quietness-c-help-please/33702/1 "2022-08-30T18:49:36Z")

</div>

I keep getting a error password.toUpperCase is not a function. What am I doing wrong here?

```python
// Move the hero and their pet to the exits.

auto onHear(auto event) {
    // Get the volume and the password.
    auto words = event.message.split(" ");
    auto volume = words[0];
    auto password = words[1];
    // If the password should be loud:
    if (volume == "Loud") {
        // The pet repeats it in UPPER CASE.
        pet.say(words[1].toUpperCase());

    }
    // If the password should be quiet:
    if (volume == "Quiet") {
        // The pet repeats it in lower case.
        pet.say(words[1].toLowerCase());
    }
    pet.moveXY(pet.pos.x+ 24, pet.pos.y);
}

auto passDoor() {
    auto guard = hero.findNearest(hero.findFriends());
    auto password = guard.password;
    // If the password should be loud:
    if (guard.isLoud) {
        // Use the .toUpperCase() method on the password and say it.
      hero.say(password.toUpperCase());
    }
    // If the password should be quiet:
    else if (guard.isQuiet) {
        // Use the .toLowerCase() method on the password and say it.
        hero.say(password.toLowerCase());
    }
    hero.moveXY(hero.pos.x+ 24, hero.pos.y);
}

int main() {
    // Enable the pet to hear the guards.
    pet.on("hear", onHear);
    // The code for the hero to pass the doors.
    hero.moveXY(10, 14);
    passDoor();
    passDoor();
    
    return 0;
}

```

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [August 30, 2022, 11:12pm UTC](https://discourse.codecombat.com/t/loud-quietness-c-help-please/33702/2 "2022-08-30T23:12:12Z")

</div>

It’s `.toupper()` or `.toUpper()` (not sure which) in c++
