20.02.2016, 16:43
You would, but due to bug/feature in pawn compiler sizeof doesn't work for 2d arrays as you would expect. You can:
1. Simply use constant number equal to your password length
2. Define a constant:
And then use MAX_PASSWORD_LENGTH.
Word of advice: avoid using common words in your enums, as you'll run into a lot of namespace clashes. I'd recommend something like
3. Use Zeex's compiler with this bug fixed
1. Simply use constant number equal to your password length
2. Define a constant:
pawn Код:
#define MAX_PASSWORD_LENGTH (128)
//say in your enum
enum E_PLAYER_DATA {
//(...)
Password[MAX_PASSWORD_LENGTH],
//(...)
}
Word of advice: avoid using common words in your enums, as you'll run into a lot of namespace clashes. I'd recommend something like
pawn Код:
//Do not do this
enum Player {
Password
}
//Do this
enum E_PLAYER {
E_PLAYER_PASSWORD
}