Jump to content

PROBLEMA: error 035: argument type mismatch (argument 2)


Recommended Posts

Salut @CibuS,

Atunci cand deschizi un topic de genul, trebuie sa oferi mai multe informatii, mai mult din codul tau (spre exemplu 5-10-15 linii de sus si 5-10-15 din josul liniei de la care provine eroarea). In plus sa stii ca nu ai deschis topicul in locatia potrivita, daca intri pe categoria "Ajutor Scripting" si dai scroll mai jos gasesti butonul "Ask new question", aici poti cere ajutor.

In alta ordine de idei, cu linia pe care ai furnizat-o si daca asta e linia, eroarea provine cel mai probabil de la 'gString' (argumentul 2), pe care probabil nu l-ai definit bine sau e definit sub alta forma pe care nu o poti folosi in cazul scriptului tau. Alt motiv nu vad sa fie.

Formatul pentru functia respectiva e urmatoarea:

orm_addvar_string(ORM:id, var[], var_maxlen, const columnname[])

Exemplu cum il poti folosi:

new playerName[ MAX_PLAYER_NAME ];

orm_addvar_string( ormid, playerName, MAX_PLAYER_NAME, "name" );


EDIT: O alta varianta ar fi ca poate folosesti o versiune mai veche pentru mysql, la care poate difera formatul pentru functia respectiva.

Edited by shane

Daca te-am ajutat =>


Link to comment
Share on other sites

YCMD:setslot(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 7) 
        return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai acces la aceasta comanda.");
    new id, slot;
    if(sscanf(params, "ui", id, slot))
        return SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/setslot <playerid/name> <slot>");

    gString[0] = EOS;
    format(gString, sizeof(gString), "(/setslot) %s set %s slot %d");
    SendAdminMessage(COLOR_RED, gString, 5);
    return true;
function SQL_CheckPlayer(playerid, id) {
    if(cache_num_rows() == 0) 
        return ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "Referral:", "Insert referral:\nInvalid id.", "Select", "Close");
    new ORM:ormid = orm_create("users"); gString[0] = EOS;
    orm_addvar_string(ormid, gString, MAX_PLAYER_NAME, "name");
    orm_apply_cache(ormid, 0);
    SetPVarInt(playerid, "Referral", id);
    format(RegisterReferral[playerid], MAX_PLAYER_NAME, gString);
    format(gString, 100, "Esti sigur ca %s te-a adus pe comunitate?", gString);
    ShowPlayerDialog(playerid, DIALOG_REGISTER6, DIALOG_STYLE_MSGBOX, "Referral:", gString, "Ok", "Back");
    return true;


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.

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.