MYSQL not insert (frag.gs)
#1

Anyone could help me to find where is the problem?

I have this register system:
Code:
if(dialogid == DIALOG_REGISTER) {
    if(!response) return Kick(playerid);
    if(response) {
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Please enter a valid password!", "Please enter a valid registration password\nTo continue press Register\n\nOxiRegister 1.0\n", "Register", "Quit");
        else {
			new vidainicial = 100;
			new skininicial = 7;
			SetPlayerSkin(playerid, skininicial);
            SHA256_PassHash(inputtext, HASH_SENHA, pInfo[playerid][pSenha], 64);
            GetPlayerIp(playerid, ip, sizeof(ip));
			format(query, sizeof(query), "INSERT INTO `accounts` (`Username`, `Senha`, `IP`, `hp`, `playerlskin`) VALUES ('%s', '%s', '%s', '%i', '%i')"
				, GetName(playerid), pInfo[playerid][pSenha], ip, vidainicial, skininicial);
			mysql_query(ConnectMYSQL,query);
            pInfo[playerid][Registered] = true;
            pInfo[playerid][LoggedIn] = true;
            Logado[playerid] = 1;
			SendClientMessage(playerid, COLOR_GREY, "Conta registrada!");
            cache_get_value_int(0, "UserID", pInfo[playerid][UserID]);
            firstlogin[playerid] = true;
            OnPlayerLogin(playerid);
        }
    }
    return 1;
}
In my house it's work...
But in host of frag.gs is not work...

It's not registering a new account...
The strange is, login(load), logout(save) is working, but it not...

I'm using MySQL plugin R41-2
Reply


Messages In This Thread
MYSQL not insert (frag.gs) - by ubunttu - 02.02.2017, 17:40
Respuesta: MYSQL not insert (frag.gs) - by Eloy - 03.02.2017, 14:08

Forum Jump:


Users browsing this thread: 2 Guest(s)