Won't create a MySQL row on register
#1

pawn Код:
stock MySQL_Register(playerid, passwordstring[])
{
    PlayerInfo[playerid][pCash] = 200;
    PlayerInfo[playerid][pLevel] = 1;
    PlayerInfo[playerid][pBank] = 500;
    PlayerInfo[playerid][pAdminLevel] = 0;
    new query[350], pname[24], IP[15];
    GetPlayerName(playerid, pname, 24);
    GetPlayerIp(playerid, IP, 15);
    format(query, sizeof(query), "INSERT INTO playerdata (Username, Password, Cash, Level, Bank, PosX, PosY, PosZ, PosA, IP, AdminLevel) VALUES('%s', SHA1('%s'), '%d', '%d', '%d', 1295, 183, 20, 97, '%s', '%d')", pname, passwordstring, PlayerInfo[playerid][pCash], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pBank], IP, PlayerInfo[playerid][pAdminLevel]);
    mysql_query(query);
    Logged[playerid] = 1;
    return 1;
}
If I set the Cash, Level, Bank and AdminLevels to numbers it works, but if I do it this way by using PlayerInfo variables, it doesn't create a new row in the MySQL table, weird.
Reply


Messages In This Thread
Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:17
Re: Won't create a MySQL row on register - by T0pAz - 04.02.2013, 01:24
Re: Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:28
Re: Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:30
Re: Won't create a MySQL row on register - by T0pAz - 04.02.2013, 01:35
Re: Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:41
Re: Won't create a MySQL row on register - by T0pAz - 04.02.2013, 01:42
Re: Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:48
Re: Won't create a MySQL row on register - by T0pAz - 04.02.2013, 01:52
Re: Won't create a MySQL row on register - by AphexCCFC - 04.02.2013, 01:56

Forum Jump:


Users browsing this thread: 1 Guest(s)