Quote:
Originally Posted by thecount
For enums of varying or long lengths, you may also add an element at the end of the list to represent the amount of elements before it to help with looping and such. Like:
PHP Code:
enum type{
enum1, //0
enum2, //1
enum3, //2
TOTAL_ENUM = 3
}
For your situation, I think you would just want something like
PHP Code:
view_as<Days>:GetRandomInt(Monday, Sunday);
or whatever the syntax is for that. I don't cast variables to different types very often in SourcePawn.
|
Code:
int day = view_as<Days>(GetRandomInt(Monday, Sunday));
Got 2 same warnings on this line :
warning 213: tag mismatch
warning 213: tag mismatch
__________________