Can't export enumeration of global strings on my entity object

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

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

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

njamster | 2020-08-01 18:13