SA-MP Forums Archive
Filterscript won't load after restart - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Filterscript won't load after restart (/showthread.php?tid=476959)



Filterscript won't load after restart - KickInTheMick - 21.11.2013

Hello,
I have problem with my filterscript when it create .cfg file in folder it don't load again I tried to fix but it don't load after new start of samp-server.exe. I tried to add printf and when I load it it start showing from print("11"); to print("21"); non stop.

pawn Код:
stock split(const strsrc[], strdest[][], delimiter)
{
    new i, li;
    print("11");
    new aNum;
    print("12");
    new len;
    print("13");
    while(i <= strlen(strsrc)){
        print("14");
        if(strsrc[i]==delimiter || i==strlen(strsrc)){
            print("15");
            len = strmid(strdest[aNum], strsrc, li, i, 128);
            print("16");
            strdest[aNum][len] = 0;
            print("17");
            li = i+1;
            print("18");
            aNum++;
            print("19");
        }
        i++;
        print("20");
    }
    print("21");
    return 1;
}

EDIT: No Warnings/Errors


Re: Filterscript won't load after restart - RenSoprano - 21.11.2013

Can you show us the lines where you use split function?


Re: Filterscript won't load after restart - KickInTheMick - 21.11.2013

Код:
split(filestring, dPosition, '|');



Re: Filterscript won't load after restart - Konstantinos - 21.11.2013

Quote:
Originally Posted by KickInTheMick
Посмотреть сообщение
I have problem with my filterscript when it create .cfg file in folder it don't load again I tried to fix but it don't load after new start of samp-server.exe. I tried to add printf and when I load it it start showing from print("11"); to print("21"); non stop.
Would you mind to explain it again because I don't understand what the problem is.

Since it prints the numbers, that means the function is called; therebefore it is called through the filterscript (if the split function is from the filterscript). If it gets called many times (non stop as you stated), then it's most likely used inside a timer or OnPlayerUpdate.

So you'll need to explain the problem in a better way so we can understand and show us more code such as where the above line you posted is used at.