Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted (edited)

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 =>

spacer.png

Posted

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;
}

unknown.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.