SA-MP Forums Archive
Everything don't work? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Everything don't work? (/showthread.php?tid=224658)



[SOLVED]Everything don't work? - leong124 - 12.02.2011

Hi everyone,
Here's a summary of my problem:
  1. Gamemode script doesn't work (but timers in that script works,only the other things can't)
  2. Callbacks in gamemode also doesn't work and they return their default value
  3. Only have this problem randomly
  4. Filterscripts works
  5. No new plugins added, only changed some server rules in the gamemode script
  6. Tried to disable custom log system/anti-spam system(with GetTickCount) but still have the problem
  7. Plugins work(Streamer Plugin,sscanf and Whirlpool)
  8. Print function in gamemode script does work
  9. Variables in the gamemode script haven't reseted when the things works again(i.e. things stored in the variables wasn't lost)
Weird...please help


EDIT: solved.


Re: Everything don't work? - Mean - 12.02.2011

Maybe some of your plugins fails to load, did you add any new plugins lately?


Re: Everything don't work? - leong124 - 12.02.2011

No.
I just changed the server rules today and the script is the same as yesterday I think.
Strangely, everything works fine yesterday.
Also, everything works at first, but fails after some time.
Is that the problem of writing log?
pawn Код:
stock WriteLog(const data[],const bool:printlog = true)
{
    if(IsFolderExists("/SCFRI/SAdmin/Records/Log/"))
    {
        new string[130],yy,mm,dd;
        getdate(yy,mm,dd);
        format(string,sizeof(string),"/SCFRI/SAdmin/Records/Log/%d年%02d月%02d日伺服器紀錄.txt",yy,mm,dd);
        new File:serverlog = fopen(string,io_append);
        gettime(yy,mm,dd);
        format(string,sizeof(string),"[%02d:%02d:%02d] %s",yy,mm,dd,data);
        if(printlog) print(string);
        strcat(string,"\r\n");
        for(new i = 0,k = strlen(string);i < k;i++)
            fputchar(serverlog,string[i],false);
        fclose(serverlog);
    }
    return 1;
}
My local language is 16-bit characters so I use fputchar instead of fwrite.

EDIT:
I've disabled that function but I still get the same problem.
Will that be any problem with GetTickCount if I turn off my PC and turn it on again?

The problem is so weird. :/


Re: Everything don't work? - leong124 - 13.02.2011

Bump...
Problems still not solved today...

EDIT:
Now I solved that.
I've added some scripts like this:
pawn Код:
while((pos = strfind(string,"\\",false,pos+1)) != -1) strins(string,"\\",pos+1);
to fix some bugs on 16-bit characters.

That little bit of sh!t caused everything fail