/changepass problem
#5

Okay, so I have fixed a bit on it and it only returns 1 error now.
pawn Код:
dcmd_changepass(playerid, params[])
{
    new name[MAX_PLAYER_NAME], buf[150], newpass[30];
    GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(params,"s", newpass)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /changepass [new password]");
    if(strlen(params) >= 3)
    {
        format(file, sizeof(file), "users/%s.txt", name);
        newpass = udb_hash(buf); // here is where I get the error
        dini_Set(file, "Password", newpass);
        SendClientMessage(playerid, COLOUR_GREEN, "Your password has been successfully been changed");
    }
    else
    {
        SendClientMessage(playerid, COLOUR_RED, "Your password must be atleast 3 characters long");
    }
    return 1;
}
Errors:

Quote:

C:\GTA SERVER\gamemodes\Server.pwn(230 : error 033: array must be indexed (variable "newpass")

Reply


Messages In This Thread
/changepass problem - by Dolph - 11.03.2012, 14:43
Re: /changepass problem - by fiki574 - 11.03.2012, 14:47
Re: /changepass problem - by Dolph - 11.03.2012, 14:51
Re: /changepass problem - by Issam - 11.03.2012, 16:38
Re: /changepass problem - by Dolph - 11.03.2012, 16:55

Forum Jump:


Users browsing this thread: 1 Guest(s)