# Build an RPG Character - Build an RPG Character

**URL:** <https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484>\
**Category:** Curriculum Help\
**Tags:** python\
**Created:** [May 21, 2026, 11:13am UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484 "2026-05-21T11:13:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![firelightthagamer](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/firelightthagamer/32/415609_2.png) [@firelightthagamer](https://forum.freecodecamp.org/u/firelightthagamer)\
**Post date:** [May 21, 2026, 11:13am UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484/1 "2026-05-21T11:13:32Z")

</div>

### Tell us what’s happening:

i dont know why i can’t check 18 and 19 yet my function is doing wat is required

### Your code so far

```py
full_dot = '●'
empty_dot = '○'
def create_character(name, strength, intelligence, charisma):
    if not isinstance(name, str):
        return "The character name should be a string"
    elif name == "":
        return "The character should have a name"
    elif len (name) > 10:
        return "The character name is too long"
    elif " " in name:
        return "The character name should not contain spaces"

    elif not isinstance(strength, int) or not isinstance(intelligence, int) or not isinstance(charisma, int):
        return "All stats should be integers"
    elif strength < 1 or intelligence < 1 or charisma < 1:
        return "All stats should be no less than 1"
    elif strength > 4 or intelligence > 4 or charisma > 4:
        return "All stats should be no more than 4"
    elif strength + intelligence + charisma != 7:
        return "The character should start with 7 points"
    strength_bar = full_dot * strength + empty_dot * (10 - strength)
    int_bar = full_dot * intelligence + empty_dot * (10 - intelligence)
    charisma_bar = full_dot * charisma + empty_dot * (10 - charisma)
    print(f"""{name}
\nSTR {strength_bar}
\nINT {int_bar}
\nCHA {charisma_bar}""")

create_character('ren', 4, 2, 1)

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36`

### Challenge Information:

Build an RPG Character - Build an RPG Character

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/python-v9/lab-rpg-character/build-an-rpg-character)**
>
> Learn to Code — For Free

GitHub Link: [https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/lab-rpg-character/67d83df6f82eda3868dd2a84.md](https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/blocks/lab-rpg-character/67d83df6f82eda3868dd2a84.md)

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [May 21, 2026, 11:22am UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484/2 "2026-05-21T11:22:04Z")

</div>

Welcome to the forum @firelightthagamer!

Your function should be returning a string. Currently, it is just printing.

To see what your function returns, wrap your _function call_ in `print()`.

Happy coding!

---

<div class="post-metadata">

**Author:** ![firelightthagamer](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/firelightthagamer/32/415609_2.png) [@firelightthagamer](https://forum.freecodecamp.org/u/firelightthagamer)\
**Post date:** [May 21, 2026, 11:51am UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484/3 "2026-05-21T11:51:41Z")

</div>

The issue was with my indentation as well as printing rather than returning. thanks alot for the help

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 18, 2026, 11:51am UTC](https://forum.freecodecamp.org/t/build-an-rpg-character-build-an-rpg-character/789484/4 "2026-06-18T11:51:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
