Needing some help with Dini
#7

Quote:
Originally Posted by WrathOfGenesis
Telling us the line numbers could help us to identify where the problem is
Well the error lines are under OnPlayerLogin:
pawn Код:
PlayerInfo[playerid][pMarriedTo] = dini_Get(string2, "MarriedTo"); //error line
        PlayerInfo[playerid][pNote1] = dini_Get(string2, "Note1"); //error line
        PlayerInfo[playerid][pNote1s] = dini_Int(string2, "Note1s");
        PlayerInfo[playerid][pNote2] = dini_Get(string2, "Note2"); //error line
        PlayerInfo[playerid][pNote2s] = dini_Int(string2, "Note2s");
        PlayerInfo[playerid][pNote3] = dini_Get(string2, "Note3"); //error line
        PlayerInfo[playerid][pNote3s] = dini_Int(string2, "Note3s");
        PlayerInfo[playerid][pNote4] = dini_Get(string2, "Note4"); //error line
        PlayerInfo[playerid][pNote4s] = dini_Int(string2, "Note4s");
        PlayerInfo[playerid][pNote5] = dini_Get(string2, "Note5"); //error line
        PlayerInfo[playerid][pNote5s] = dini_Int(string2, "Note5s");
Quote:
Originally Posted by Seif_
Use strmid when using dini_Get with the string variables.
I dont quite get it Seif, I looked the code for dini_Get and there is strmid function already,
bother to explain further more, Im new to Dini, but still understand it allitle.
pawn Код:
stock dini_Get(filename[],key[]) {
    new tmpres[DINI_MAX_STRING];
   
    new key_length = strlen(key);
    if (key_length==0 || key_length+2>DINI_MAX_STRING) return tmpres;
   
    new File:fohnd;
    fohnd=fopen(filename,io_read);
    if (!fohnd) return tmpres;
   
    while (fread(fohnd,tmpres)) {
        if (
            tmpres[key_length]=='='
            && !strcmp(tmpres, key, true, key_length)  
        ) {
            /* We've got what we need */
            DINI_StripNewLine(tmpres);
            strmid(tmpres, tmpres, key_length + 1, strlen(tmpres), DINI_MAX_STRING); // STRMID FUNC
Reply


Messages In This Thread
Needing some help with Dini - by Virtual1ty - 27.01.2010, 12:03
Re: Needing some help with Dini - by pierhs - 27.01.2010, 13:36
Re: Needing some help with Dini - by Virtual1ty - 27.01.2010, 13:38
Re: Needing some help with Dini - by Virtual1ty - 28.01.2010, 11:09
Re: Needing some help with Dini - by WrathOfGenesis - 28.01.2010, 11:42
Re: Needing some help with Dini - by biltong - 28.01.2010, 11:52
Re: Needing some help with Dini - by Virtual1ty - 28.01.2010, 12:37
Re: Needing some help with Dini - by goudewup - 28.01.2010, 14:59
Re: Needing some help with Dini - by Virtual1ty - 28.01.2010, 15:15

Forum Jump:


Users browsing this thread: 1 Guest(s)