Umm, idk what I did wrong. Maybe some fresh eyes?
#1

The errors are as follow:
Код:
\System\SQL\sql_user.inc(142) : error 001: expected token: "]", but found "-identifier-"
\System\SQL\sql_user.inc(142) : warning 215: expression has no effect
\System\SQL\sql_user.inc(142) : error 001: expected token: ";", but found "]"
\System\SQL\sql_user.inc(142) : error 029: invalid expression, assumed zero
\System\SQL\sql_user.inc(142) : fatal error 107: too many error messages on one line
Line 142:
pawn Код:
SetUserHashedPassword(playerid, tmp);
SetUserHashedPassword:
pawn Код:
#define SetUserHashedPassword(%0,%1)        format(user_login_info[%0][user_password], sizeof(user_login_info[%0][user_password]), "%s", %1)
Login Information Enum:
pawn Код:
enum user_login_information
{
    user_password[MAX_USER_HASHED_PASSWORD],
    user_ip[MAX_PLAYER_IP],
    user_secret_key[MAX_USER_SECRET_KEY],
    user_sql_id
};
new user_login_info[MAX_PLAYERS][user_login_information];
Relevant code:
pawn Код:
new tmp[130];

cache_get_field_content(0, "password", tmp, GetSQLConnection(), MAX_USER_HASHED_PASSWORD);
SetUserHashedPassword(playerid, tmp);
I goofed something up, I just don't see it. I know its something simple and I will feel like an idiot when someone points it out.
Reply
#2

You can't use sizeof like that with enums, replace sizeof(user_login_info[%0][user_password]) to MAX_USER_HASHED_PASSWORD
Reply
#3

Quote:
Originally Posted by Jefff
Посмотреть сообщение
You can't use sizeof like that with enums, replace sizeof(user_login_info[%0][user_password]) to MAX_USER_HASHED_PASSWORD
Really? I swear it did before, well I will keep that in mind for future reference. Thanks! I Knew it was something simple lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)