Fixes2 problem -
andrejc999 - 12.05.2018
Yo everyone,
So my server was having issues with client crashing for no reason, until I removed the fixes include(first version),
than I switched to Fixes2 and there were still some problems like timers started to bug out and client crashes happened from time to time.
I don't know if it's because of me or the Fixes2 include has some issues.
If anyone knows what the problem could be I would appreciate some help.
Btw I include Fixes2 on top of my script and I added the Fixes2 plugin as the first plugin on the server.
Re: Fixes2 problem -
TadePoleMG - 12.05.2018
What type of your server has and any admin script you have?
Re: Fixes2 problem -
andrejc999 - 12.05.2018
It's my server. It's a roleplay server and the GM has more than 30.000 lines of code.
So everything is created by me and I have a huge admin system but that shouldn't be a problem tho.
Re: Fixes2 problem -
andrejc999 - 12.05.2018
Quote:
Originally Posted by ******
How many files is your code split up in to?
|
It's just one file, one Gamemode.
Btw I have a problem with y_ini.
As you told me I switched from Dini to y_ini and I can't seem to successfully load anything from my ini files.
Here is what I did:
Код:
forward LoadUser_data(playerid, name[], value[]);
public LoadUser_data(playerid, name[], value[])
{
new score;
INI_Int(bla bla);
.
.
.
return 1;
}
and
OnPlayerConnect(playerid)
{
new file[64];
format(file, sizeof(file), "/Users/%s.ini", GetName(playerid));
if(fexist(file))
{
INI_ParseFile(file, "LoadUser_%s", .bExtra = true, .extra = playerid);
}
return 1;
}
What's wrong here?
Re: Fixes2 problem -
andrejc999 - 13.05.2018
First of all I don't think my GM is poorly written because I've done everything to make it as good as it gets.
Second when I include fixes2 into my GM, after joining the server some timers get called for more than 20 times instantly after spawning so don't tell me it's me who's failing to script properly.
This is the one:
Код:
SetTimer("AutoVehRespawn", 3600000, true);
Tell me 1 bad thing about this timer and I will accept that my GM is badly written by myself.
And third I want to point out some things:
1) I'm not using timers for Cooldowns
2) I'm always returning a stock function
3) I use streamer, ZCMD, sscanf and YSI\y_iterate which are all amazing and work perfectly
4) I have my very own anti cheat which works the best it can
and there are many many things that I've done to optimize my GM so I don't think that my coding is the problem here.
And are there any tips you can give me to improve my scripts? (if possible)
Btw I've been coding for 5 years now (with breaks ofc) and I've been making my server for last 2 years.
Re: Fixes2 problem -
andrejc999 - 13.05.2018
Quote:
Originally Posted by ******
Well one instant piece of advice I can give you is split it up in to many small parts. The fact that it is one 30000 line file is why I know it is badly written, because that by definition is bad coding. There's no isolation between components and I'd be willing to put money on a list of other bad habits in your code without ever seeing it.
You can't claim that a single 30000 line file GM is well written, because that is literally the definition of badly written.
|
Ok but why is every roleplay server written in one big GM file and not in many small ones, and is there a way to hook a filterscript to a gamemode so that it takes enums and variables from the GM itself?