Jump to content
  • 0

Problema SQLite


dariumare

Question

Am facut un fs si lam compilat si nu mi-a dat erori dar cand scriu comanda in joc nu merge ce am gresit

	if(strcmp(cmd, "/boxing", true) == 0)
	{
	    new Query[256];
	    new boxing = 1;
	    format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, playerid);
	    db_free_result(db_query(Database, Query));
	    SendClientMessage(playerid, COLOR_WHITE, "Bravo, ai invatat boxing!");
		return 1;
	}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Cum ai rezolvat ? cu db_query ? cum ti-am zis eu

Nu nu are nici o legatura db_query si db_freeresult fac acelasi lucru numai ca db_freeresult elimina toata informatia

an rezolvat cu:

Nu trebuia asa:

format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, playerid);

ci trebuia

format(Query, sizeof(Query), "UPDATE `FightStyles` SET `Boxing` = '%d' WHERE `Nume` = '%s'",boxing, Name(playerid));

si mai jos:

Name(i){
	new n[24];
	GetPlayerName(i,n,24);
	return n;
}

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.