Count Emptiness moveNSteps function problem Solved


#1

This is my code

# Count the whitespace on both sides of a riddle.

# This function moves the hero N steps right.
def moveNSteps(n):
    hero.moveXY(hero.pos.x + 8 * n, hero.pos.y)

# Read the riddle.
enemies = hero.findEnemies()
enemy = hero.findNearest(enemies)
riddle = enemy.riddle
# Trim whitespace from both sides and store in a variable
trimmed = riddle.trim()
# Find the difference between the lengths:
d = riddle - trimmed
# Use the result and moveNSteps function to move to the spot:
moveNSteps(d)
# Say something there!
hero.say("anime")

And there is an error that pops up that says

and I makes no sense to me because I am sure that it has two inputs can someone help me.


#2

I just needed the length so I was just being dumb. :persevere: