Read out a config- file
#3

try this:
when you use it, its goes like this : split(TEXT,WHERE TO SAVE,WHERE TO SPLIT)
Exaple:
pawn Код:
new tmp[2][128];
split("Hello Dude!",tmp,' '); // tmp[0]=Hello tmp[1]=Dude!
The Script:
pawn Код:
stock split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    new aNum;
    new len;
    while(i <= strlen(strsrc))
    {
        if(strsrc[i] == delimiter || i == strlen(strsrc))
        {
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            strdest[aNum][len] = 0;
            li = i+1;
            aNum++;
        }
        i++;
    }
    return 1;
}
Reply


Messages In This Thread
Read out a config- file - by [MF]FACE - 11.12.2010, 13:20
Re: Read out a config- file - by legodude - 11.12.2010, 14:35
Re: Read out a config- file - by XePloiT - 11.12.2010, 14:48
Re: Read out a config- file - by [MF]FACE - 11.12.2010, 16:55
Re: Read out a config- file - by MadeMan - 11.12.2010, 17:05
Re: Read out a config- file - by [MF]FACE - 11.12.2010, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)