Raised This Month: $ Target: $400
 0% 

Solved warn 213 when i'm using enums


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
kww
Senior Member
Join Date: Feb 2021
Location: Russia
Old 06-23-2021 , 07:56   warn 213 when i'm using enums
Reply With Quote #1

Hi! I'm getting warning 213: tag mismatch if i using enum like below:
PHP Code:
enum eTheBestEnumeration{
    
ENUM_ZERO 0,
    
ENUM_ONE,
    
ENUM_TWO
}
// .......
public somecmd(executor) {
    new 
arg[2]
    
read_argv(1argcharsmax(arg))
    
    new 
iArg clamp(str_to_num(arg), 02)
    if(
iArg == ENUM_ZERO) {} //insert useless code here
    
else if(iArg == ENUM_ONE) {} //insert useless code here
    
else if(iArg == ENUM_TWO) {} //insert useless code here
    // I KNOW HERE MUST BE USED SWITCH INSTEAD OF IFS
    // And it works perfectly with switches
    
}

How can it be fixed?

Last edited by kww; 06-23-2021 at 14:23.
kww is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:33.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode