Hello, thanks to this community I downloaded Godot 3.5.2 and have repeated the exact same code as provided by this YouTube video:

A few errors have popped up, but fewer then before and I feel closer to getting a handle on coding then I did before.

Could any of you aid me in solving these errors, thank you.

my code

his Code

Lines 21 and 22 of level.gd are missing the =
It should be

$playerscore.text = str(playerscore)
$rivalscore.text = str(rivalscore)

For the warning messages, if you click on [Ignore], an annotation will be inserted to suppress the warning. For the "argument never used" warning, you also have the choice of prefixing an underscore to the name.

But first make sure that the warning message doesn't indicate a actual mistake in your code.

Even though they're only warnings, it's a good practice to get rid of them, since they make it harder to see actual errors.

11 days later

I corrected my error but the level scene still refuses to run and I have the message "Invalid operands 'Vector2' and 'float' in operator '+' "

How do I fix it?

  • xyz replied to this.

    Carmes As the error message says, you're trying to add a vector, which is a two-number value, with a float which is a single number. Such operation makes no sense and is mathematically undefined, hence the error. You can either add vector to another vector, or float to another float.