Array Must Be Indexed
#3

Quote:
Originally Posted by Hansrutger
Посмотреть сообщение
I haven't done much dini but oh' well.

Inside your enum declaration you should be having something like this:

enum e_PlayerInfo {
Banned_By,
Ban_Reason
};

Have you made those two into arrays? Should be looking like this if you want it to be correct:
enum e_PlayerInfo {
Banned_By[MAX_PLAYER_NAME],
Ban_Reason[128]
};

EDIT:
Nevermind I was stupid, it should maybe work like if you put it into a format.

Код:
format(PlayerInfo[playerid][Banned_By], MAX_PLAYER_NAME, "%s", dini_Get(file, "Banned_By");
Banned_By[MAX_PLAYER_NAME + 1]
for the termination \0 cell

also, I suggest to use memcpy or strcat at least instead of format
Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2);
strcpy(dest, str[], length);
for this reason
Reply


Messages In This Thread
Array Must Be Indexed - by Speaker - 19.07.2017, 10:54
Re: Array Must Be Indexed - by Hansrutger - 19.07.2017, 10:57
Re: Array Must Be Indexed - by Kaperstone - 19.07.2017, 11:07
Re: Array Must Be Indexed - by Speaker - 19.07.2017, 11:11
Re: Array Must Be Indexed - by Kaperstone - 19.07.2017, 11:16
Re: Array Must Be Indexed - by Hansrutger - 19.07.2017, 13:20

Forum Jump:


Users browsing this thread: 1 Guest(s)