[Ajuda] Salvando Weapons no Mysql R39
#1

Jб tentei ate falar chega antes de vim aqui perguntar mais
Oque estou fazendo de errado neste comando

Код:
stock SaveWeapons(playerid)
{
	if (!PlayerLogged(playerid))
        return 0;

	new query[2400], tmpaString[500], tmpString[500];
	new weapons[13][2];

    for(new i = 0; i <= 12; i++)
    {
        GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
        
        format(tmpString, sizeof(tmpString), "Weap%d", i);
        format(query, sizeof(query), "UPDATE `playerweaps` SET `%s` = '%d' WHERE `id`='%d'" , tmpString , weapons[i][0] , PlayerInfo[playerid][pID]);

        format(tmpaString, sizeof(tmpaString), "AWeap%d", i);
        format(query, sizeof(query), "UPDATE `playerweaps` SET `%s` = '%d' WHERE `id`='%d'" , tmpaString , weapons[i][1] , PlayerInfo[playerid][pID]);
    }

	mysql_function_query(gTunel, query, false, "EnviarConsulta", "");
	return 1;
}
O erro no Mysql e que nao salva nenhuma arma
Код:
[16:16:44] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `playerweaps` SET `AWeap12` = '0' WHERE `id`='1'", callback: "EnviarConsulta", format: "(null)"
[16:16:44] [DEBUG] CMySQLQuery::Execute[EnviarConsulta] - starting query execution
[16:16:44] [DEBUG] CMySQLQuery::Execute[EnviarConsulta] - query was successfully executed within 1.326 milliseconds
[16:16:44] [DEBUG] CMySQLResult::CMySQLResult() - constructor called
Reply
#2

Resolvido galera vlws ai
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)