+11 votes

If it's not supported this should be removed from the documentation.

in Engine by (516 points)

Here is the problem.

Message error: Unexpected token: Constant

2 Answers

+35 votes
Best answer

You can select the lines you want to comment out and hit ctrl+k to comment/uncomment them.

""" is misleading, as it looks like a comment in the script editor. Text in triple-quotes are multi-line strings. The documentation should be changed, as well as the color-coding of the syntax in the editor.

by (1,328 points)
selected by

Very useful ! Thanks to all !

–1 vote

http://docs.godotengine.org/en/latest/reference/gdscript.html?highlight=comment#comments

Comments

Anything from a # to the end of the line is ignored and is considered a comment.

# This is a comment
Multi-line comments can be created using “”” (three quotes in a row) at the beginning and end of a block of text.

""" Everything on these
lines is considered
a comment """
by (9,742 points)

You tested it ?

I am using it often.
This is actually how to make multi-line string.
so, there will be an error if use it outside of func
you can use it only inside func

Thanks for these informations.

As you know real comments are ignored by the interpreter or compiler and you can write them everywhere so these additional information is necessary to simulate multiline comments.

It's unfortunate because I wanted to write a little text on top of my scripts...

Open an issue then?

@Bojidar There's already two issues opened on Github. It seems this feature doesn't attract people.

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 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 webmaster@godotengine.org with your username.