The data don't is updated [MySQL R39-2]
#1

I need help. Upon check if I inserted data in the table (name, password, ip, status) correctly. Status is updated (when I register or login is updated to 1 and when I disconnect to 0) and I work perfectly. But also I have that when I disconnect is updated the data (admin, position, skin etc etc) are several data but the thing is that I do not update, it is as if there is no such function. Within the server, I changed the "Admin" variable to '10' and when I disconnect should be '10 'in the database but it's not, is the same as when I register, nothing is updated. (is loaded fine the password when I login, I mean that is all right the load data system)

I tried to handle some data with true and false I saw in a forum post and I thought that was why he did not update the data but returned the system to normal. (so use the variables as 0 = false and 1 = true) and everything was the same, did not update the data. I thought the size of the Query was short (Although I think would returns errors, I don't know) and I increased much and everything was the same.

Here I show how is update the data:

pawn Код:
stock GuardarDatos(playerid)
{
    new Query[1000];
    GetPlayerHealth(playerid,PlayerInfo[playerid][Vida]);
    GetPlayerArmour(playerid,PlayerInfo[playerid][Chaleco]);
    GetPlayerPos(playerid,PlayerInfo[playerid][PosX],PlayerInfo[playerid][PosY],PlayerInfo[playerid][PosZ]);
    mysql_format(MiSQL,Query,sizeof(Query),"UPDATE `usuarios` SET `IP` = '%s', `AdminNivel` = '%d', `Dinero` = '%d', `Asesinatos` = '%d', `Muertes` = '%d', `Skin` = '%d', `Advertencias` = '%d', `Muteado` = '%d', `Vida` = '%f', `Chaleco` = '%f', `PosX` = '%f', `PosY` = '%f', `PosZ` = '%f', `VecesExpulsado` = '%d' WHERE `Nombre` = '%s'",
    PlayerInfo[playerid][Ip],
    PlayerInfo[playerid][AdminNivel],
    PlayerInfo[playerid][Dinero],
    PlayerInfo[playerid][Asesinatos],
    PlayerInfo[playerid][Muertes],
    PlayerInfo[playerid][Skin],
    PlayerInfo[playerid][Advertencias],
    PlayerInfo[playerid][Muteado],
    PlayerInfo[playerid][Vida],
    PlayerInfo[playerid][Chaleco],
    PlayerInfo[playerid][PosX],
    PlayerInfo[playerid][PosY],
    PlayerInfo[playerid][PosZ],
    PlayerInfo[playerid][VecesExpulsado],
    GetName(playerid));
    mysql_tquery(MiSQL,Query);
    return 1;
}
sorry for my bad English I'm learning
Reply
#2

solved
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)