0 votes

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?

in Engine by (358 points)

1 Answer

0 votes

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

by (26 points)

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!

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!

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.