This does not look like Python. Either you've confused Python with JavaScript or you've just copy-pasted other solutions on the forum.Also be sure to format your code according to the FAQ. When you are posting, there is an icon at the top that looks something like this:

Click on it and then copy-paste your code.

hero.say("You'll get something like this.")
while True:
hero.say("Of course, your indentations will still appear.")