Fixes2 problem
#1

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.
Reply
#2

What type of your server has and any admin script you have?
Reply
#3

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.
Reply
#4

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?
Reply
#5

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.
Reply
#6

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)