Quote:
Originally Posted by Sunehildeep
PHP код:
MemberName[sizeof_hStorage]
That's a string, if you format it like for example
"Message", it has 7 letters, so MemberName[0], MemberName[1], .......... MemberName[6] would be occupied by the letters of "Message".
And the thing explained in the thread is 2-dimensional arrays in enum, but your's is 1 dimensional.
MemberName[0][0] <- 2 dimensional
MemberName[0] <- 1 dimensional
You can use the 2 dimensional as this
PHP код:
CMD:name(playerid)
{
format(GroupInfo[21][MemberName][6][0], MAX_PLAYER_NAME, "Message");
return 1;
}
CMD:pr(playerid)
{
for(new g=0; g<20; g++)
{
new string[64];
format(string, sizeof(string), "%s", GroupInfo[21][MemberName][g][0]);
SendClientMessage(playerid, -1, string);
}
return 1;
}
Another thing to change is
PHP код:
#define hStorage][%1][%2] hStorage][((%1)*hStorage_size2)+(%2)]
to
PHP код:
#define MemberName][%1][%2] MemberName][((%1)*hStorage_size2)+(%2)]
Understood?
|
I do not necessarily want 2-dimensional arrays in enum, I just want string array in enum and I thought that I could do that with 2 dimensional array

I cant do it like this
enum Data
{
MemberName[20][MAX_PLAYER_NAME]
};
because it brings me error