It’s showing me this strange error.
# Use findSouthernUnits to get enemies to the south.
# If there are more ogres south of you than friends.
# Then summon another "soldier".
What if there wasn’t a unit?
I have the same problem, can anyone solve it?
Welcome @Coder101. Before you proceed in receiving assistance in your code, please be sure to tell us what problem you are having and the code you are currently using. When posting the code, use triple backticks(```).
I noticed that you are not providing an array for the function to check.
Also, I assigned the findSouthernUnits() function to a variable to that receives the return southernUnits array.
Then compare the length of that variable (ogres) against the len(friends).