"enum"

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
zandor
New User
Posts: 14
Joined: Sat Feb 04, 2006 10:13 am

"enum"

Post by zandor »

I script from 3 years but I have never used "enum".
Someone can explain me how to use it?
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

I am not sure what you are talking about here.

Can you explain a little better what you mean by enum?

Is it EnumerateOnlineCharacters?
Is it EnumerateItemsInContainer?

Those are the only things I can think of that have that in it.
melanius
Neophyte Poster
Posts: 39
Joined: Sat Jan 28, 2006 12:39 pm

Post by melanius »

enumerator is a language feature used to define a set of constants. It is usually used when you have to declare more than 4 constants, instead of typing const a hundred times, you define an enumerator in the form:

Code: Select all

enum <enum_name>
	CONST_NAME1 := <value>,
	CONST_NAME2 := <value>,
	CONST_NAME3 := <value>,
	CONST_NAME4 := <value>
endenum
<enum_name> any string value name such as MY_ENUMARATION, and <value>, whatever can be defined as a constant.

edit: you can check the distro SVN repository for more examples.
Post Reply