Random beginner-question: What should be in those brackets?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pferft

Hi everyone,

I’m trying to get an understanding of how to save the state of a checkbox (a selfmade button I can switch “on and off”) and right at the beginning I already stumble over the first obstacle within my save.gd:

extends Resource

export(???) var checkboxes

What should I replace the ??? with? Does it matter? And how could I find out what fits?

:bust_in_silhouette: Reply From: Lazarwolfe

export(bool) var checkbox should do it, if I understand the question correctly.

I thought (and still think) so, too. I’m just irritated that the “bool” is colored red… that doesn’t “look right” (I had the impression things in those brackets should be colored green).

Well, at least bool doesn’t give me an error message, so I think it might just work.
Thank you!

pferft | 2020-09-10 17:41

Yeah, the syntax coloring might look somewhat weird while starting out, but it’s there to let you know that you’re in fact using a known keyword for GDScript, good luck!

Lazarwolfe | 2020-09-12 17:14