Help: error 035: argument type mismatch (argument 2)
#1

Hi, I am having an error in PAWN I can not figure out.

I get error 35: argument type mismatch (argument 2)

This is the line the error is on:

pawn Код:
User_Register(playerid, sqlpw);

This is my User_Register function:
pawn Код:
public User_Register(playerid, sqlpw)
{
    new query[200], name[MAX_PLAYER_NAME],message[100];
    GetPlayerName(playerid, name,sizeof(name));
    format(query, sizeof(query), "INSERT INTO playerdata (name, password, cash, admin) VALUES('%s', '%s', 10000, 0)", name, sqlpw);
    mysql_query(query);
    format(message,sizeof(message),"Welcome, %s! You have been registered successfully!",name);
    SendClientMessage(playerid,COLOR_YELLOW,message);
    return 1;
}
Reply
#2

Your passwords are stored as strings, but you are passing an integer to the function. And I would highly recommend hashing those passwords.
Reply
#3

I am hashing them, as a matter of fact, querypw is the hashed PW. The hash is done under OnDialogResponse with Whirlpool.

Also, what do you mean I am passing an integer? I use the function with the playerid and sqlpw, then the function uploads it to mysql. I don't understand how it works?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)