Raised This Month: $32 Target: $400
 8% 

Solved How can I get the size of the enum?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EmeraldGhost
Junior Member
Join Date: Oct 2015
Old 11-25-2019 , 00:12   How can I get the size of the enum?
Reply With Quote #1

enum DataLoad_SE
{
DATA_INVALID,
DATA_TALENT1,
DATA_TALENT2,
...
DATA_TALENT7
}

I have an enum like this. Now I want to get the size of it for the SQL fetch. Can anyone tell me how to do?

Thank you
__________________
aka. EmeraldGhost / eeeeeG ^^

Last edited by EmeraldGhost; 11-25-2019 at 02:16.
EmeraldGhost is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-25-2019 , 00:34   Re: How can I get the size of the enum?
Reply With Quote #2

PHP Code:
enum DataLoad_SE
{
DATA_INVALID// 0
DATA_TALENT1// 1
DATA_TALENT2// 2
...
DATA_TALENT7// 7
ENUM_LENGTH // 8


Add an extra enum at the bottom and use it's value as max.
__________________
Silvers is offline
EmeraldGhost
Junior Member
Join Date: Oct 2015
Old 11-25-2019 , 02:15   Re: How can I get the size of the enum?
Reply With Quote #3

Quote:
Originally Posted by Silvers View Post
PHP Code:
enum DataLoad_SE
{
DATA_INVALID// 0
DATA_TALENT1// 1
DATA_TALENT2// 2
...
DATA_TALENT7// 7
ENUM_LENGTH // 8


Add an extra enum at the bottom and use it's value as max.
Got it. Ty !!!
__________________
aka. EmeraldGhost / eeeeeG ^^
EmeraldGhost is offline
Reply



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 09:30.


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