APickledWalrus / skript-placeholders

Placeholder integration for Skript.
GNU General Public License v3.0
28 stars 8 forks source link

1 log handler was not stopped properly! #22

Closed Mushkrem closed 3 years ago

Mushkrem commented 3 years ago

Hey! I get this error while running my skript and it's pretty much spamming the console, super annoying. (at ch.njol.skript.expressions.ExprParse.get(ExprParse.java:181))

image image

Additionally, while the error 'happens', as it doesn't for quite some time after the server's boot, placeholder I'm trying to register can't be retrieved by other plugins (RealScoreboard as in an example below). Here's my code, and the error's effect in-game: image image btw. it flickers, the most of the time you're able to see your ping, but occasionally for around a second the only thing you can see is %player_ping%.

Installed skript addons (if needed):

APickledWalrus commented 3 years ago

Can you send the full error in something like pastebin? Also, how fast is your scoreboard refreshing?

Mushkrem commented 3 years ago

It's 10 ticks, also here's the full error; https://pastebin.com/raw/DWnyFeaM See [02:06:49] that's where the error is somewhat a bit different.

APickledWalrus commented 3 years ago

I'm not entirely sure why this would be happening other than the super high refresh rate.. perhaps turn it up higher (maybe 60 ticks?) and let me know if you still have the issue

Mushkrem commented 3 years ago

Sorry for the late response, and honestly, I don't think it's caused by high refresh rate as I have 3 more placeholders made with your addon on it, and they aren't sending any errors. Yes, the problem still persists, but i figured out, that it happens only when i reload the skript a few times. Here's the whole code of that skript: https://pastebin.com/4tpewj2z maybe I missed some syntax?

bilektugrul commented 3 years ago

player's ping is already an integer/number. You don't have to parse it as an integer. Also, I'm not sure if this is just an example or production code but you can use Player PAPI expansion for getting ping.

Mushkrem commented 3 years ago

player's ping is already a integer/number. You don't have to parse it as an integer.

Isn't it a string? Well, anyway without that line, the next if statement doesn't work.

image

As for that papi expansion to get ping, yeah I can do that, but i want ping be to colored depending on the player's current ping.

APickledWalrus commented 3 years ago

They mean that you should just do:

set {_var} to player's ping

bilektugrul commented 3 years ago

player's ping is already a integer/number. You don't have to parse it as an integer.

Isn't it a string? Well, anyway without that line, the next if statement doesn't work.

image

As for that papi expansion to get ping, yeah I can do that, but i want ping be to colored depending on the player's current ping.

Check PAPI config. There should be output replacement if i'm not wrong.

Mushkrem commented 3 years ago

Now it works without giving out errors even after reloading it, which is weird, but I guess it's fixed?

Check PAPI config. There should be output replacement if I'm not wrong.

Not needed as pickledwalrus already gave a solution =)

Thanks for help and quick response!

APickledWalrus commented 3 years ago

It may have been the parsing expression that was adding some latency in getting the placeholder... happy to hear it works now though!