View Single Post
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 01-07-2019 , 21:23   Re: enum struct member variable size
Reply With Quote #2

PHP Code:
#define MAX_PRESET_NAME_LENGTH 100
#define MAX_TABLE_NAME_LENGTH 100

enum struct PlayerTableIdentifier
{
    
int dbPresetName[MAX_PRESET_NAME_LENGTH];
    
char tableName[MAX_TABLE_NAME_LENGTH];
}

enum struct PlayerTable
{
    
PlayerTableIdentifier pTableIdentifier;
    
char abc[300];
    
int client;
}

public 
void OnPluginStart(){

    
PlayerTable test;
    
Format(test.abcsizeof(test.abc), "test");
    
Format(test.pTableIdentifier.dbPresetNamesizeof(test.pTableIdentifier.dbPresetName), "test");
    
Format(test.pTableIdentifier.tableNameMAX_TABLE_NAME_LENGTH"test");
    
test.client 2;

Looks like enum struct inside of enum struct is a problem?

the size of PlayerTable.abc can be retrieved..
__________________
Starbish is offline