08.08.2013, 15:55
If you're storing the string into an array, it won't load it properly. The reason for this is because the "sizeof" operator will get the size of the array, and not the string you're trying to store it in. So, for example, if the size of your array is 3, then it'll load 3 characters and nothing more.
Doing this:
Is not the same as doing this:
In the first example, it will only load two characters of the user's password because the array is the size of the enum (i.e. 2). In the second example, though, it'll figure out that the size of the string "szPassword" is 129 and it can load the entire password.
A workaround is to either add a large string size at the end of your cache_get_X(..) lines, or to modify the a_mysql.inc file. I would choose the first option, though. The second might screw things up.
Doing this:
pawn Код:
enum enumPlayerInfo
{
pID,
pPassword[129]
};
new
pStats[MAX_PLAYERS][enumPlayerInfo];
cache_get_row(row, field, pStats[playerid][pPassword]);
pawn Код:
new
szPassword[129];
cache_get_row(row, field, szPassword);
A workaround is to either add a large string size at the end of your cache_get_X(..) lines, or to modify the a_mysql.inc file. I would choose the first option, though. The second might screw things up.