Jump to content

fatal error kill the server


t0m

Recommended Posts

Hello, good morning, I wanted to tell us to help me..
These events make that when you have such equipment equipped it gives you a skill and when you unequip it, it takes it out...
The problem is that since I implemented it the server has been horrible and users complain a lot about lag.
I paid a server in amazon thinking it was my network problem...but the problem continued.....
Now delete the 18 that I had created and it works wonderfully..
Could you tell me how to solve it from the code?
Or give me some kind of solution to not miss these events?
It is as if the server would be thinking all the time about whether or not you have the item equipped and it gives you or takes away the ability.
Thank you very much in advance and these days you already have a very complete game to play which we have been creating with a group for 2 years now and it is finished.

dc9415ed09f5700db42987609da4936b.jpg

Link to comment
Share on other sites

I'm also interrested in an answer about the autorun event type.

 

I'm also using them on my game, but i don't have players for now so i can't tell if it give lags. But in terms of optimisation instead of doing the whole chain i use a rather simple system, each event include 26 of these code block and i have 7 of them for now, maybe more later. (With no lag so far, but my test include 2 people at best for now)

 ee89be497c61773bef91f914690beb2a.png

 

I already have opened a similar subject and it was unclear of the potential of lag from these event :

 

 

Link to comment
Share on other sites

Your problem there probably is that you are constantly running common events with no stop. That means you are calling each of those events for each of the online players at all times.

 

A good practice that could help you to decrease the lag might be using the spawn conditions. Lets say you wanna check if some player wears a certain equipment and give him access to a certain spell while he wears it. On the spawn condition you'll check both things: 1. Has him x item equiped?(true if yes) 2. Does he know x spell?(true if not).

 

With this, the event wont run unless that player has that equipment AND doesnt know that spell. Its senseless to run that event if the player doesnt have the equipment, and also its senseless if the player already know that spell. If the player meet both conditions event will run, but after teaching the spell to the player the conditions won't meet, so event will only run once.

 

If you also want the player to forget the spell when he unequip the item, create another page on that common event wit the conditions 1. Has him x item equiped? (true if not) 2. Does he know x spell? (true if yes).

 

With this, if player doesn't wear that item AND if he knows the spell, the event will run only once as well, because after making him forget the spell conditions won't meet.

 

I hope this help you to reduce the running events in your projects @t0m @Beast Boyz

Link to comment
Share on other sites

@KhaikaaI've been doing my spell system like this because i use variables to check if the player can have the upgraded version of the spell, and the player use an item to have the next tier activated it make the spell instantly appear in the spell windows (5 Tier of spell). And the main "problem" is that the player can "forget" spell with right click, with this much spell it would take me too much work for the same result.

Also if the spell is "bound" so the player cannot forget it, the event system cannot force forget the spell too.

 

Maybe i should still use some  spawn conditions, but it will just have another flaws.

Link to comment
Share on other sites

1 minute ago, Beast Boyz said:

@KhaikaaI've been doing my spell system like this because i use variables to check if the player can have the upgraded version of the spell, (5 Tier of spell). And the main "problem" is that the player can "forget" spell with right clic, with this much spell it would take me too much work for the same result.

Also if the spell is "bound" so the player cannot forget it, the event system cannot force forget the spell too.

 

Maybe i should still use some  spawn conditions, but it will just have another flaws.

I may be wrong but I believe its the same case. It doesnt matter if you are checking player's equipment or player's variable. If the variable condition is true and the player doesnt know the spell, event will run only once. If player forgets that spell, conditions will meet again(since variable condition is true and he doesnt know the spell) and will teach the spell again. And, of course, you will need 1 page for each spell you want to teach/remove. If that feature deserves the work or not is up to you and the kind of project you are working on.

Link to comment
Share on other sites

3 minutes ago, Khaikaa said:

I may be wrong but I believe its the same case. It doesnt matter if you are checking player's equipment or player's variable. If the variable condition is true and the player doesnt know the spell, event will run only once. If player forgets that spell, conditions will meet again(since variable condition is true and he doesnt know the spell) and will teach the spell again. And, of course, you will need 1 page for each spell you want to teach/remove. If that feature deserves the work or not is up to you and the kind of project you are working on.

Well, i will have at last 30 classes, with 5 spells each, and each spell have 5 tier. It  would mean at last 750 pages.  (25 by event). Technically i'm already doing this but on one page only since i've done 7 classes.

Link to comment
Share on other sites

Just now, Beast Boyz said:

Well, i will have at last 30 classes, with 5 spells each, and each spell have 5 tier. It  would mean at last 750 pages.  (25 by event). Technically i'm already doing this but on one page only.

Yes, but the way you are doing means all players will be running an event with 30 if conditions(for checking class) and up to 5 extra if conditions(after meeting one of the class conditions, up to 5 variables' check). And all that just for that feature(I assume you have many more common events), that will probably destroy your server with lag if one day you have 20 or even less simultaneous players

Link to comment
Share on other sites

11 minutes ago, Beast Boyz said:

@Khaikaa I've been doing a test to meet the requirement in only one page, what do you think of this ? 

 

Thats much better than what you showed before in my opinion, could be a bit better in different pages as you would avoid the first if of the event, but I don't believe its a big problem.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...