Problem with enums.
#5

pawn Код:
dcmd_register(playerid, params[])
{
    new string[256], pname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pname,sizeof(pname));
    sscanf(params, "s", pData[playerid][pKey]);
    format(string, sizeof(string),"/accounts/%s.ini", pname);
    if(dini_Exists(string))
    {
        SendClientMessage(playerid, RED, "[ERROR]: Account already exists. Please log in!");
        return 1;
    }
    else
    {
        if(!isnull(params))
        {
            dini_Create(string);
            dini_Set(string, "pName", pname
            dini_Set(string, "pKey", pData[playerid][pKey]);
            dini_FloatSet(string, "pMoney", 0);
            dini_IntSet(string, "pScore", 0);
            dini_IntSet(string, "pAdminLevel", 0);
            dini_Unset(string, "pSecKey");
        }
        else SendClientMessage(playerid, RED, "The password field must not be empty!");
        return 1;
    }
    return 1;
}
try that, i just removed the pData[playerid][pName] it should work, also you where creating the wrong file on dini_Create, i changed that to string
Reply


Messages In This Thread
Problem with enums. - by sobolanux - 02.09.2010, 13:50
Re: Problem with enums. - by CyNiC - 02.09.2010, 14:01
Re: Problem with enums. - by mrcoolballs - 02.09.2010, 14:04
Re: Problem with enums. - by sobolanux - 02.09.2010, 14:31
Re: Problem with enums. - by mrcoolballs - 02.09.2010, 14:41
Re: Problem with enums. - by sobolanux - 02.09.2010, 16:35

Forum Jump:


Users browsing this thread: 3 Guest(s)