Jump to content

No idea why this skript crashes my server


pete_parker

Recommended Posts

On 7/21/2021 at 9:29 AM, pete_parker said:

So im trying to make a hcf skript for my sever but everytime i put it in it crashes , same with any other typa script like this i have no idea why


Logs : 

https://hastebin.com/aziwoyixik.yaml 

The skript :

https://hastebin.com/egubiyelog.sql

My plugins !

https://imgur.com/a/guDlFsM
 


 

So if anyone could help me that would be great 

So, I am not the best at finding out errors or anything but I do see a lot of loop all players in the Skript. From what I know about Skript, those can cause lag if you have lots of players on the server. For the Skript that you have, sometimes when it loops all the players, it does a lot of stuff. For example, 

				loop all players in radius 10 of player:
					add loop-player to {_renemies::*}
					size of {_renemies::*} is 0:
						apply potion of strength 2 to player for 3 seconds
						send "&7" to player
						send "&c❤ &f{@rage-brick-name} &6has been used&6." to player
						send "&c❤ &6You have received Strength II for &f3 seconds&6." to player
						send "&7" to player
						delete {_renemies::*}
					amount of {_renemies::*} = 1:
						apply potion of strength 2 to player for 3 seconds
						send "&7" to player
						send "&c❤ &f{@rage-brick-name} &6has been used&6." to player
						send "&c❤ &6You have received Strength II for &f3 seconds&6." to player
						send "&7" to player
						delete {_renemies::*}
					amount of {_renemies::*} = 2:
						apply potion of strength 2 to player for 6 seconds
						send "&7" to player
						send "&c❤ &f{@rage-brick-name} &6has been used&6." to player
						send "&c❤ &6You have received Strength II for &f6 seconds&6." to player
						send "&7" to player
						delete {_renemies::*}
					amount of {_renemies::*} = 3:
						apply potion of strength 2 to player for 9 seconds
						send "&7" to player
						send "&c❤ &f{@rage-brick-name} &6has been used&6." to player
						send "&c❤ &6You have received Strength II for &f9 seconds&6." to player
						send "&7" to player
						delete {_renemies::*}
					amount of {_renemies::*} >= 4:
						apply potion of strength 2 to player for 12 seconds
						send "&7" to player
						send "&c❤ &f{@rage-brick-name} &6has been used&6." to player
						send "&c❤ &6You have received Strength II for &f12 seconds&6." to player
						send "&7" to player
						delete {_renemies::*}
				wait 10 seconds
				set {partneritem.%player%} to false

If there is more than 10 players in that radius, it will have to loop what you wrote there 10 times which if there is lots of those in the Skript, I believe it can cause a lot of lag.

 

You also have over 1500 lines which I don't think it's a good idea considering some of the parts can be separated to different files. 

 

Owner of play.hiveminez.net

 

⊱------------------------------⊰

Joined Minehut on 1/28/2021 (Same day I got Minecraft)

[VIP] - 3/14/2021

[LEGEND] - 5/27/2021

⊱------------------------------⊰

Discord - NotKaizo#0001

In-game name - iKaizo_

If you need any help, feel free to contact me.

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...