TheGodfather Posted August 2, 2021 Report Share Posted August 2, 2021 Salut, vreau sa fac ca prin comanda /edithouse sa pot modifica si interiorul caselor, am incercat asta dar primesc eroare: ==================================================================== Error ID: 1065, Eroare: Query was empty Callback: gQuery: ==================================================================== YCMD:edithouse(playerid, params[], help) { if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Asteapta %d secunde.", aspam[playerid]); new id, code[180], list; if(PlayerInfo[playerid][pAdmin] < 7) return true; if(sscanf(params, "iis[180]", id,list,code)) { SCM(playerid, COLOR_GREY, "{4CA27A}USAGE:{FFFFFF} /edithouse <house id> <code> <result>"); SCM(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned, (5) Interior"); return true; } if(HouseInfo[id][hID] == 0) return SCM(playerid, COLOR_GOLD, "Aceasta casa nu exista!"); new result = strval(code), string[180], str[180]; switch(list) { case 1: { format(string, sizeof(string), "Ai editat nivelul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Level='%d' WHERE ID='%d'",HouseInfo[id][hLevel], HouseInfo[id][hID]); mysql_tquery(SQL,str, "", ""); } case 2: { format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code); SCM(playerid, COLOR_GOLD, string); format(HouseInfo[id][hDiscription],256,code); mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[id][hDiscription],HouseInfo[id][hID]); mysql_tquery(SQL,str, "", ""); } case 3: { format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result)); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hValue] = result; mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d",result,HouseInfo[id][hID]); mysql_tquery(SQL,str, "", ""); } case 4: { format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hOwned] = result; mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d",result,HouseInfo[id][hID]); mysql_tquery(SQL,str, "", ""); } // case 5: { format(string, sizeof(string), "Ai editat interiorul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hInterior] = result; mysql_format(SQL,string,sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d,",result,HouseInfo[id][hID]); mysql_tquery(SQL,str,"",""); } // } UpdateLabel(1, id); return true; } Quote Link to comment Share on other sites More sharing options...
0 TheGodfather Posted August 3, 2021 Author Report Share Posted August 3, 2021 up Quote Link to comment Share on other sites More sharing options...
0 CostiiAdv Posted August 3, 2021 Report Share Posted August 3, 2021 Salut, te cheama Toby? Quote Discord: CostiiAdv#6666 Link to comment Share on other sites More sharing options...
0 TheGodfather Posted August 3, 2021 Author Report Share Posted August 3, 2021 4 hours ago, CostiiAdv said: Salut, te cheama Toby? Salut, nu are nicio relevanta numele meu Quote Link to comment Share on other sites More sharing options...
0 Akan Posted August 3, 2021 Report Share Posted August 3, 2021 Vezi ca in query-ul mysql_format(SQL,string,sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d,",result,HouseInfo[id][hID]); ai o virgula aiurea la sfarsit dupa ID=%d, sterge-o. Quote Discord: ! Akan !#6675 Link to comment Share on other sites More sharing options...
0 TheGodfather Posted August 3, 2021 Author Report Share Posted August 3, 2021 15 minutes ago, Akan said: Vezi ca in query-ul mysql_format(SQL,string,sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d,",result,HouseInfo[id][hID]); ai o virgula aiurea la sfarsit dupa ID=%d, sterge-o. Daca pun un alt interior imi da doar cerul in jurul meu, tot albastru fara nimic. Quote Link to comment Share on other sites More sharing options...
0 Akan Posted August 3, 2021 Report Share Posted August 3, 2021 Ar trebui sa setezi si coordonatele unde este interiorul, nu doar id-ul interiorului. Quote Discord: ! Akan !#6675 Link to comment Share on other sites More sharing options...
0 CostiiAdv Posted August 4, 2021 Report Share Posted August 4, 2021 Contacteaza-ma in privat pe discord CostiiAdv#1337, te ajut eu si daca ai nevoie, contra-cost iti ofer serviciile mele pe o perioada anume. Quote Discord: CostiiAdv#6666 Link to comment Share on other sites More sharing options...
0 Hackeru Suprem Posted November 1, 2023 Report Share Posted November 1, 2023 YCMD:edithouse(playerid, params[], help) { if (aspam[playerid] > 0) { return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Asteapta %d secunde.", aspam[playerid]); } new id, code[180], list; if (PlayerInfo[playerid][pAdmin] < 7) { return true; } if (sscanf(params, "iis[180]", id, list, code)) { SCM(playerid, COLOR_GREY, "{4CA27A}USAGE:{FFFFFF} /edithouse <house id> <list> <code>"); SCM(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned, (5) Interior"); return true; } if (HouseInfo[id][hID] == 0) { return SCM(playerid, COLOR_GOLD, "Aceasta casa nu exista!"); } new result = strval(code), string[180], str[180]; switch (list) { case 1: format(string, sizeof(string), "Ai editat nivelul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); mysql_format(SQL, str, sizeof(str), "UPDATE houses SET Level='%d' WHERE ID='%d'", result, HouseInfo[id][hID]); mysql_tquery(SQL, str, "", ""); break; case 2: format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code); SCM(playerid, COLOR_GOLD, string); format(HouseInfo[id][hDiscription], 256, code); mysql_format(SQL, str, sizeof(str), "UPDATE houses SET Discription='%s' WHERE ID='%d'", HouseInfo[id][hDiscription], HouseInfo[id][hID]); mysql_tquery(SQL, str, "", ""); break; case 3: format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result)); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hValue] = result; mysql_format(SQL, string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d", result, HouseInfo[id][hID]); mysql_tquery(SQL, str, "", ""); break; case 4: format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hOwned] = result; mysql_format(SQL, string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d", result, HouseInfo[id][hID]); mysql_tquery(SQL, str, "", ""); break; case 5: format(string, sizeof(string), "Ai editat interiorul la casa %d in %d.", id, result); SCM(playerid, COLOR_GOLD, string); HouseInfo[id][hInterior] = result; mysql_format(SQL, string, sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d", result, HouseInfo[id][hID]); mysql_tquery(SQL, str, "", ""); break; } UpdateLabel(1, id); return true; } Quote Link to comment Share on other sites More sharing options...
Question
TheGodfather
Salut, vreau sa fac ca prin comanda /edithouse sa pot modifica si interiorul caselor, am incercat asta dar primesc eroare:
====================================================================
Error ID: 1065, Eroare: Query was empty
Callback:
gQuery:
====================================================================
YCMD:edithouse(playerid, params[], help) {
if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Asteapta %d secunde.", aspam[playerid]);
new id, code[180], list;
if(PlayerInfo[playerid][pAdmin] < 7) return true;
if(sscanf(params, "iis[180]", id,list,code)) {
SCM(playerid, COLOR_GREY, "{4CA27A}USAGE:{FFFFFF} /edithouse <house id> <code> <result>");
SCM(playerid, 0xFFFFFFFF, "(1) Level, (2) Nume, (3) Pret, (4) Owned, (5) Interior");
return true;
}
if(HouseInfo[id][hID] == 0) return SCM(playerid, COLOR_GOLD, "Aceasta casa nu exista!");
new result = strval(code), string[180], str[180];
switch(list) {
case 1: {
format(string, sizeof(string), "Ai editat nivelul la casa %d in %d.", id, result);
SCM(playerid, COLOR_GOLD, string);
mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Level='%d' WHERE ID='%d'",HouseInfo[id][hLevel], HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 2: {
format(string, sizeof(string), "Ai editat numele la casa %d in %s.", id, code);
SCM(playerid, COLOR_GOLD, string);
format(HouseInfo[id][hDiscription],256,code);
mysql_format(SQL,str,sizeof(str),"UPDATE houses SET Discription='%s' WHERE ID='%d'",HouseInfo[id][hDiscription],HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 3: {
format(string, sizeof(string), "Ai editat pretul la casa %d in $%s.", id, FormatNumber(result));
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hValue] = result;
mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Value`='%d' WHERE ID=%d",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
case 4: {
format(string, sizeof(string), "Ai editat detinatorul la casa %d in %d.", id, result);
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hOwned] = result;
mysql_format(SQL,string, sizeof(string), "UPDATE houses SET `Owned`='%d' WHERE ID=%d",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str, "", "");
}
//
case 5: {
format(string, sizeof(string), "Ai editat interiorul la casa %d in %d.", id, result);
SCM(playerid, COLOR_GOLD, string);
HouseInfo[id][hInterior] = result;
mysql_format(SQL,string,sizeof(string), "UPDATE houses SET `Interior`='%d' WHERE ID=%d,",result,HouseInfo[id][hID]);
mysql_tquery(SQL,str,"","");
}
//
}
UpdateLabel(1, id);
return true;
}
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.