learn-gdscript icon indicating copy to clipboard operation
learn-gdscript copied to clipboard

print() not working

Open Keega777 opened this issue 2 years ago • 1 comments

When I try and use the print() function for debugging in the practice sections, it does not seem to work. If I write something as simple as

print("Hello")

I'm met with this error:

Unexpected token: Built-In Func

Am I off with my syntax? Or am I missing something else?

Keega777 avatar Oct 06 '23 04:10 Keega777

Could you please show me the entire code you're trying to write?

In GDScript calls to functions like print() should always be inside of functions. If you're trying to write it at the top of the code, outside of functions, it's normal for you to see this error.

NathanLovato avatar Oct 06 '23 05:10 NathanLovato