register_value("test", "test_value", 1);
int i = test_value;
Add enum value from script
Would it be possible to use a enum value that was registered in the same script?
I think it's not possible because test_value doesn't exist at compile time. You would have to break this code in two separate modules. Compile and execute first one with [font=CourierNew, monospace][size=2]register_value [/font][font="Arial"][size=2]calls[size=2], an[/font]d then compile second one with previously registered values.
But if all you want to do is to create an enum, why don't declare it in common way?
like (in script)
enum test
{
test_value = 1
}
But if all you want to do is to create an enum, why don't declare it in common way?
like (in script)
enum test
{
test_value = 1
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement