Jump to content
  • 0

Comanda /edithouse


TheGodfather

Question

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

7 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0
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.

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.