[MySQL] /cahngepass
#1

Error:
Код:
C:\Users\Unknown123\Documents\Server\gamemodes\Unknown.pwn(2282) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Code:
pawn Код:
dcmd_changepass(playerid, params[])
{
    new oldpass;
    new queue[313], WPhash[145], escape[145];
    if(sscanf(params, "ss", oldpass, WPhash)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /changepass (Old Password) (New Password)");
    else
    {
        mysql_real_escape_string(oldpass, escape); //Line 2282
        WP_Hash(WPhash, sizeof(WPhash), escape);
        format(queue, sizeof(queue), "UPDATE `Players` SET `Password` = '%s' WHERE `Username` = '%s'", WPhash, PlayerIP(playerid));
        mysql_query(queue);
    }
    return 1;
}
Reply
#2

Why is oldpass an integer? It should be an array to store all of the characters.

pawn Код:
new oldpass[128];
Also your array sizes are complete madness, just think about them for a while
Reply
#3

Quote:
Originally Posted by JaTochNietDan
Посмотреть сообщение
Why is oldpass an integer? It should be an array to store all of the characters.

pawn Код:
new oldpass[128];
Also your array sizes are complete madness, just think about them for a while
Thanks, but still dont working =/

And if i type wrong "oldpass" then i get a message like "Wrong Old Password!" but i dont know how to do it =/

About my array sizes... i know... complete madness xD
Reply
#4

Quote:
Originally Posted by Unknown123
Посмотреть сообщение
Thanks, but still dont working =/

And if i type wrong "oldpass" then i get a message like "Wrong Old Password!" but i dont know how to do it =/

About my array sizes... i know... complete madness xD
How could that happen if there isn't a line saying "Wrong Old Password"?
Reply
#5

Quote:
Originally Posted by Antonio [G-RP]
Посмотреть сообщение
How could that happen if there isn't a line saying "Wrong Old Password"?
Because i dont know how to add it

You probaliby mis-understood me, undestandable, i got bad english :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)