Can't use enum on ACS?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
Laskow
Posts: 100
Joined: Tue Feb 16, 2021 7:35 am
Preferred Pronouns: He/Him

Can't use enum on ACS?

Post by Laskow »

Sorry if I'm overlooking something. Does anyone know how to use enum on ACS just like DECORATE or ZScript? I've checked https://zdoom.org/wiki/Constants but I can't figure it out. Do I need another script or function to work it like other programming languages? Thanks in advance.
User avatar
Player701
 
 
Posts: 1710
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Can't use enum on ACS?

Post by Player701 »

I don't think ACS supports enums, but since they are just collections of constants, you can use #define instead.
User avatar
Marrub
 
 
Posts: 1202
Joined: Tue Feb 26, 2013 2:48 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Arch Linux
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Contact:

Re: Can't use enum on ACS?

Post by Marrub »

GDCC-ACC actually does feature enum and even struct if you want an extended ACS. BCC does as well, but it has some incompatibilities to be noted.
Laskow
Posts: 100
Joined: Tue Feb 16, 2021 7:35 am
Preferred Pronouns: He/Him

Re: Can't use enum on ACS?

Post by Laskow »

I didn't know GDCC. It's very interesting but it's going to be a tough way learning it from only the codes because I cannot access the wiki (at least since 2020, according to the forum post). zt-bcc sounds also interesting though the short-circuited logical operators might be really tricky. The other way is there is no tricky feature but only the constants. It may take time to understand how to apply them.

This time I found a way to avoid using enum fortunately though, when I encounter the situation I need to use it in the future, I'll consider using one of these compilers. Thanks.
Post Reply

Return to “Scripting”