0 votes

enter image description here

any clue why it's giving me this error? also, am I doing something wrong in the if statement? (sorry im relatively new to godot) SIDE NOTE: EVEN WHEN I DO PUT AN INDENTATION IT GIVES ME AN ERROR, SORRY I GAVE A BAD SCREENSHOT

enter image description here

edit: the second screenshot is the correct one

Godot version 3.3.2
in Engine by (12 points)

1 Answer

0 votes

That is not random at all. An if statement is incomplete unless it has at least one line of code to be executed when the condition is true.

This is incomplete:

if x > 10:

This is not:

if x > 10:

Hence exactly what the error message says: it expects to see an indented block after an if.

by (21,722 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.