Jump to content

Problema baza date | Erorr Case


Recommended Posts

[21:53:31] Error ID: 1065, Eroare: Query was empty [21:53:31] Callback: [21:53:31] gQuery: [21:53:31] ==================================================================== [21:53:31] ==================================================================== [21:53:31] Error ID: 1065, Eroare: Query was empty [21:53:31] Callback: [21:53:31] gQuery: [21:53:31] ====================================================================Cand se salveaza in baza imi da erorile astea de la ce drq sa fie

Daca puteti sa ma ajutati 

 

Comanda: 

 

 

YCMD:givehouse(playerid, params[], help) {
    new house, id, query[256], string[180];

    if(PlayerInfo[playerid][pAdmin] < 6) return true;

    if(sscanf(params, "id", id, house)) return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/givehouse <playerid/name> <house id>");

    mysql_format(SQL, query, sizeof(query), "UPDATE users SET House='999' WHERE House='%d'", id);
    mysql_tquery(SQL, query, "", "");

    PlayerInfo[id][pHouse] = house;

    query[0] = EOS;
    mysql_format(SQL, query, sizeof(query), "UPDATE users SET House='%d' WHERE ID='%d'", house, PlayerInfo[id][pSQLID]);
    mysql_tquery(SQL, query, "", "");

    format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s i-a dat lui %s(%d) casa %d.", GetName(playerid), GetName(id), id, house);
    SendAdminMessage(COLOR_WHITE, string, 1);

    format(string, sizeof(string), "Administratorul %s ti-a dat casa %d.", GetName(playerid), house);
    SCM(id, COLOR_YELLOW, string);

    HouseInfo[house][hOwned] = 1;

    format(HouseInfo[house][hOwner], 256, GetName(id));

    HouseInfo[house][hValue] = 0;

    UpdateLabel(1, house);

    query[0] = EOS;
    mysql_format(SQL, query, sizeof(query), "UPDATE houses SET Owned='1', Owner='%s', Value='0' WHERE ID='%d'", GetName(id), house);
    mysql_tquery(SQL, query, "", "");
    return true;
}

Link to comment
Share on other sites

mysql_format(SQL, query, sizeof(query), "UPDATE users SET House='999' WHERE House='%d'", id);
mysql_tquery(SQL, query, "", "");

Nu înțeleg de ce folosești această interogare, poți să o ștergi. Probabil de asta primești erorile. Te rog, postează un mysql_log mai curat.

Link to comment
Share on other sites

Acum 3 minute, matei_ a spus:

mysql_format(SQL, query, sizeof(query), "UPDATE users SET House='999' WHERE House='%d'", id);
mysql_tquery(SQL, query, "", "");

Nu înțeleg de ce folosești această interogare, poți să o ștergi. Probabil de asta primești erorile. Te rog, postează un mysql_log mai curat.

Mna gm b-hood facut de HPQ123 dupa ce faci multe in gm iti da errori la case acum si nustiu cum drq sa rezolv

Link to comment
Share on other sites

YCMD:givehouse(playerid, params[], help) {
	new hID, ID, query[256], string[180];
	if(PlayerInfo[playerid][pAdmin] < 6) return true;

	if(sscanf(params, "ui", ID, hID))
		return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/givehouse [playerid / part of name] [house id]");

	PlayerInfo[ID][pHouse] = hID;

	query[0] = EOS;
	mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `House` = '%i' WHERE `ID` = '%i'", hID, PlayerInfo[ID][pSQLID]);
	mysql_tquery(SQL, query, "", "");

	format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s i-a dat lui %s (ID: %i) casa %i.", GetName(playerid), GetName(ID), ID, hID);
	SendAdminMessage(COLOR_WHITE, string, 1);

	format(string, sizeof(string), "Administratorul %s ti-a dat casa %i.", GetName(playerid), hID);
	SCM(ID, COLOR_YELLOW, string);

	HouseInfo[hID][hOwned] = 1;
	format(HouseInfo[hID][hOwner], 24, GetName(ID));
	HouseInfo[hID][hValue] = 0;

	UpdateLabel(1, hID);

	query[0] = EOS;
	mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Owned` = '1', `Owner` = '%s', `Value` = '0' WHERE `ID` = '%i'", GetName(ID), hID);
	mysql_tquery(SQL, query, "", "");
	return true;
}

Sper să îți fie de ajutor comanda, am rescris-o puțin.

Edited by matei_
Link to comment
Share on other sites

Acum 8 minute, matei_ a spus:

YCMD:givehouse(playerid, params[], help) {
	new hID, ID, query[256], string[180];
	if(PlayerInfo[playerid][pAdmin] < 6) return true;

	if(sscanf(params, "ui", ID, hID))
		return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/givehouse [playerid / part of name] [house id]");

	PlayerInfo[ID][pHouse] = hID;

	query[0] = EOS;
	mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `House` = '%i' WHERE `ID` = '%i'", hID, PlayerInfo[ID][pSQLID]);
	mysql_tquery(SQL, query, "", "");

	format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s i-a dat lui %s (ID: %i) casa %i.", GetName(playerid), GetName(ID), ID, hID);
	SendAdminMessage(COLOR_WHITE, string, 1);

	format(string, sizeof(string), "Administratorul %s ti-a dat casa %i.", GetName(playerid), hID);
	SCM(ID, COLOR_YELLOW, string);

	HouseInfo[hID][hOwned] = 1;
	format(HouseInfo[hID][hOwner], 24, GetName(ID));
	HouseInfo[hID][hValue] = 0;

	UpdateLabel(1, hID);

	query[0] = EOS;
	mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Owned` = '1', `Owner` = '%s', `Value` = '0' WHERE `ID` = '%i'", GetName(ID), hID);
	mysql_tquery(SQL, query, "", "");
	return true;
}

Sper să îți fie de ajutor comanda, am rescris-o puțin.

Imediat incerc mersi de ajutor ❤️

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.