0 votes

I'm testing Godot and I want to export some variables such as the orientation of an entity object that i created.

here is the code :

export (String, Constants.ENTITY_ORIENTATION_LEFT, Constants.ENTITY_ORIENTATION_RIGHT) var orientation = Constants.ENTITY_ORIENTATION_LEFT

but i get the following error :

Entity.gd:3 - Parse Error: Expected ")" or "," after the export hint.

But if I hard code with regular string such as "left" and "right", it works.

Any tip ? Thanks

in Engine by (12 points)

So what's your question here? You're trying to do something that's simply not possible in GDScript as of now.

Please log in or register to answer this question.

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.