[SOLVED] Siege of Stonehold Help! Need Help


#1

I do not know what I did wrong.


#2

Read the error message. Q: What happens if there’s no enemy present? A: The code fails because “Target is null.” There is no target (enemy) so code returns null. What did you write before, hero.pickUpFlag(flag)? You checked to see if there was a flag. If this condition exists, then do something. If you just write, then do something, and there is no code to check the condition, if the conditions don’t support it, it fails.

Is there always an enemy?


#3

already figured it out


#4

Maybe could you try thinking about your problems for a bit longer if you can figure it out so soon after trying it.
Thanks. :grin: