how to fix this problem in code


can someone please help me fix this coding problem

Hey there @BamIsRich! I believe the error is that you must encapsulate what you’re checking with the if statement.

if (Distance < 100.0):

tbh there are multiple wrong things in your code:

  • while[true] doesn’t exist
  • most of the indent is wrong
  • Player.GetFortCharacter is failable hence needs to be called with square brackets
  • your if condition is also wrong

You should watch some more tutorials, I feel like this is taken from ChatGPT or smth, because the error shouldn’t be the first that popped