# Pet Translator C++

**URL:** <https://discourse.codecombat.com/t/pet-translator-c/36413>\
**Category:** Level Help\
**Created:** [November 23, 2023, 6:57am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413 "2023-11-23T06:57:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ValentyP](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@ValentyP](https://discourse.codecombat.com/u/ValentyP)\
**Post date:** [November 23, 2023, 6:57am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413/1 "2023-11-23T06:57:35Z")

</div>

I have reached the level pet translator and I am stuck on this one part. It says “// Your pet should translate commands.” and I have no idea what I am supposed to write. I have never seen this prompt before and the hints/methods don’t help. Maybe its something easy I am missing but I don’t see it. I have looked up online and like normal only can find java and python versions but in their code its not even in it. Any help?

 ![Screenshot 2023-11-22 at 10.57.16 PM](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/6/6/66daa6e5b22b44d33d9c035082c0a7dd23fcb1a3.jpeg)

---

<div class="post-metadata">

**Author:** ![MarmiteOnToast](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/marmiteontoast/32/46649_2.png) [@MarmiteOnToast](https://discourse.codecombat.com/u/MarmiteOnToast)\
**Post date:** [November 23, 2023, 9:47am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413/2 "2023-11-23T09:47:55Z")

</div>

Hi @ValentyP, welcome to the CodeCombat Discourse!

You can disregard that comment, it’s supposed to be at the top of the code, on line 1.

---

<div class="post-metadata">

**Author:** ![ValentyP](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@ValentyP](https://discourse.codecombat.com/u/ValentyP)\
**Post date:** [November 24, 2023, 5:56am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413/3 "2023-11-24T05:56:39Z")

</div>

Ok so why doesn’t the code work then.

---

<div class="post-metadata">

**Author:** ![MarmiteOnToast](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/marmiteontoast/32/46649_2.png) [@MarmiteOnToast](https://discourse.codecombat.com/u/MarmiteOnToast)\
**Post date:** [November 24, 2023, 8:49am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413/4 "2023-11-24T08:49:51Z")

</div>

Try removing the `else` and all of its contents (lines 33-35)  
It slows down your ‘hero’ and your code, and it’s not necessary

---

<div class="post-metadata">

**Author:** ![ValentyP](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@ValentyP](https://discourse.codecombat.com/u/ValentyP)\
**Post date:** [November 25, 2023, 6:37am UTC](https://discourse.codecombat.com/t/pet-translator-c/36413/5 "2023-11-25T06:37:56Z")

</div>

I did. My character doesn’t move but gets pushed back and dies.
