Jump to content
  • 0

Problema tag mismatch


MiritaXD

Question

Salut, acum3-4 zile am inceptu un gamemode de la 0, azi am adaugat un system de ore jucate si vad ca imi da eroare la fiecare update in baza de date de la orejucate. La alte salvari nu imi apaare aceasta problema.

CMD:testcn(payerid,params[]){
    Update(payerid, "TimpJucat", PlayerInfo[payerid][pPayDay], 1); // asta am adaugato pentru a testa daca apare eroarea
    Update(payerid, "OreJucate", PlayerInfo[payerid][pConnectTime], 2); //aici e problema
    return 1;
    //E:\Servere\redzking\gamemodes\redzking.pwn(5425) : warning 213: tag mismatch
}

 

function Update(playerid, bazadedate[], gamemode, tip) {
    new query[500];
    switch(type) { 
        case 1: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%d' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
        case 2: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%f' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
        case 3: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%s' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
    }
    mysql_query(handle, query);
    return 1;
}
Edited by MiritaXD
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
function Update(playerid, bazadedate[], gamemode, type) {
    new query[500];
    switch(type) { 
        case 1: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%d' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
        case 2: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%f' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
        case 3: mysql_format(handle, query, sizeof(query), "UPDATE `users` SET `%s` = '%s' WHERE `name`= '%e'", bazadedate, gamemode, GetPName( playerid ));
    }
    mysql_query(handle, query);
    return 1;
}

Ce era gresit? la functia ta acest "type" nu era inregistrat corect, era "tip", si cand faceai switch nu stia de unde sa inceapa.

  • Thanks 1
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.