When I compile my sourcemod plugin, I get a bunch of errors stating:
Quote:
error 047: array sizes do not match, or destination array is too small
|
Originally, I had a bunch of separate arrays but I decided to try and fit them in to an enum "struct" to look cleaner. I got this idea a while back while looking at the "RTD" sm plugin code.
Code:
#define MAX_RTD_EFFECTS 35
#define STRING_PERK_MAXLEN 100
enum g_ePerks
{
String:g_strPerkName[STRING_PERK_MAXLEN],
String:g_strPerkDesc[STRING_PERK_MAXLEN],
String:g_strPerkKey[STRING_PERK_MAXLEN],
g_ePerkType:g_nPerkType,
bool:g_bPerkDisabled,
Float:g_flPerkTime
};
new g_nPerks[MAX_RTD_EFFECTS][g_ePerks];
My enum:
Code:
enum g_ePlayerBoxData
{
Float:g_flPos1[3],
Float:g_flPos2[3],
Float:g_flMins[3],
Float:g_flMaxs[3],
Float:g_flOrig[3],
bool:g_bCalc
};
new g_nPlayerBoxData[MAXPLAYERS+1][g_ePlayerBoxData];
Here is a line that triggers the compile error:
Code:
GetEntPropVector(client, Prop_Send, "m_vecOrigin", g_nPlayerBoxData[client][g_flPos2] );
Now, everything was working fine before I switched to the enum. Before I had arrays like:
Code:
new Float:g_flClientPos2[MAXPLAYERS+1][3];
Is there any way of making this work that I'm not seeing? Or am I going to have to settle with a bunch of separate arrays like I had done originally?
Thanks.