Function That Reads from .INI
#10

EDIT: I've changed it and the compiler doesn't crash but it gives me these errors:

pawn Code:
stock INI_Get(filename[],key[])
{
    new File:F,string[128];
    new sname[24],sval[24];
    F = fopen(filename,io_read);
    if(!F) return sname;
    while(fread(F,string))
    {
        sscanf(string,"p<=>s[24]s[24]",sname,sval); //866
        if(!strcmp(sname,key))
        {
            sval[strlen(sval)-2] = 0;
            fclose(F);
            return sval;
           
            new nick[30];//873
            GetPlayerName(playerid,nick,24);
            format(nick,sizeof(nick),"%s.ini",nick);
            new value = strval(INI_Get(nick,"VIP"));
        }
    }
    fclose(F);
    sname[0] = '\0';
    return sname;
}
Code:
OSK-TDM.pwn(866) : error 017: undefined symbol "sscanf"
OSK-TDM.pwn(873) : warning 225: unreachable code
OSK-TDM.pwn(874) : error 017: undefined symbol "playerid"
OSK-TDM.pwn(876) : warning 204: symbol is assigned a value that is never used: "value"
Reply


Messages In This Thread
[STILL UNSOLVED]Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 17:24
Re: Function That Reads from .INI - by Jefff - 18.08.2011, 17:51
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:11
Re: Function That Reads from .INI - by [MWR]Blood - 18.08.2011, 18:17
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:19
Re: Function That Reads from .INI - by Jefff - 18.08.2011, 18:20
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:21
Re: Function That Reads from .INI - by [MWR]Blood - 18.08.2011, 18:24
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:27
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:30
Re: Function That Reads from .INI - by [MWR]Blood - 18.08.2011, 18:31
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:32
Re: Function That Reads from .INI - by Jefff - 18.08.2011, 18:39
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 18:46
Re: Function That Reads from .INI - by Jefff - 18.08.2011, 18:50
Re: Function That Reads from .INI - by Tigerbeast11 - 18.08.2011, 22:07
Re: Function That Reads from .INI - by Jefff - 19.08.2011, 00:06
Re: Function That Reads from .INI - by Tigerbeast11 - 19.08.2011, 03:00
Re: Function That Reads from .INI - by Kingunit - 19.08.2011, 03:12
Re: Function That Reads from .INI - by Tigerbeast11 - 19.08.2011, 09:32
Re: Function That Reads from .INI - by Tigerbeast11 - 23.08.2011, 16:46

Forum Jump:


Users browsing this thread: 5 Guest(s)