Solved kill crash bugg

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

SoMuchWessel

Active Member
Apr 3, 2017
147
3
18
47
Hello guys,
I got a little bit of a problem here.
I have a region with worldguard which has the flag "invincible" active. And i have the last version of the 1.12 skript and the last version of worldguard. But when a player dies with skript using "kill player", that player will 'crash'. He will not die, but whenever he sends something in chat or use a command it will say Cannot send chat message. He will also dissappear for other players.

Is there a way to fix this?
 
Hi.
So this is super confusing.
What do you mean by “when a player dies with skript using kill player”?
Do you have some code we can see?
It’s extremely hard to help you fix code we can’t see.
Also which version of skript are you using? Please don’t say latest. If you’re unsure you can run /ver skript... that’ll give you the exact version.
 
Hi.
So this is super confusing.
What do you mean by “when a player dies with skript using kill player”?
Do you have some code we can see?
It’s extremely hard to help you fix code we can’t see.
Also which version of skript are you using? Please don’t say latest. If you’re unsure you can run /ver skript... that’ll give you the exact version.

I'm sorry, i will give more detail.
Skript version: dev37c
Worldguard version: 6.2.2

I have some addons, but if i disable those, the problem is still there

I make a simple code to represent the problem:

code_language.skript:
on right click:
    player is holding a stone:
        kill player

What happens when i right-click while holding a stone:
1. Nothing appears to be happening. I am not getting killed.
2. If i use the chat of if i use commands, the message Cannot send chat message will appear.
3. I can use contains and place down blocks while im in this state
4. I can't see players or players can see me
5. If I relog, everything will be like nothing ever happens and if i never died.

I hope i gave you more information about the problem.
 
1) Try using "if tool of player is stone:" --- I know its not a tool, but tool just means what a player is holding
2) im not sure what you mean
3) again I'm not sure what this means
4) I dont think that has anything to do with skript
 
1) Try using "if tool of player is stone:" --- I know its not a tool, but tool just means what a player is holding
2) im not sure what you mean
3) again I'm not sure what this means
4) I dont think that has anything to do with skript

I made a video that will show the problem.
 
I made a video that will show the problem.
OHHHH i see what you are talking about. Sorry ... i was so confused but it makes sense now!
Ok so here is what I THINK is happening. Im not positive, but I think WorldGuard is over riding your death event. So its like the game thinks you are dead... which means ... you're dead you cant chat or use commands. But world guard is forcing you to stay alive.

So ... a couple of options to try.
1) go into your Skript config (/plugins/Skript/config.sk) and find "plugin priority" (line 117 for me) it should say high, change it to highest
then do /sk reload config.... that SHOULD over ride world guard
2) if that doesn't work, you may need to remove the invincible flag from your region (at least to test to see if that is what's causing the problem)


EDIT:
I did a test... the priority thing doesn't do anything.
But removing the invincible flag fixes it!
[doublepost=1536657988,1536657511][/doublepost]EDIT AGAIN:

change kill player
to
execute console command "kill %player%"
I know its a terrible work around, but it works
 
OHHHH i see what you are talking about. Sorry ... i was so confused but it makes sense now!
Ok so here is what I THINK is happening. Im not positive, but I think WorldGuard is over riding your death event. So its like the game thinks you are dead... which means ... you're dead you cant chat or use commands. But world guard is forcing you to stay alive.

So ... a couple of options to try.
1) go into your Skript config (/plugins/Skript/config.sk) and find "plugin priority" (line 117 for me) it should say high, change it to highest
then do /sk reload config.... that SHOULD over ride world guard
2) if that doesn't work, you may need to remove the invincible flag from your region (at least to test to see if that is what's causing the problem)


EDIT:
I did a test... the priority thing doesn't do anything.
But removing the invincible flag fixes it!
[doublepost=1536657988,1536657511][/doublepost]EDIT AGAIN:

change kill player
to
execute console command "kill %player%"
I know its a terrible work around, but it works

I really need the invincible flag.
If i do the console command, is there a way to prevent the massive spam in the logs/the console ?

By the way, i find it strange that in a older version of skript, this problem will not happen. I am not sure what version
 
I really need the invincible flag.
If i do the console command, is there a way to prevent the massive spam in the logs/the console ?

By the way, i find it strange that in a older version of skript, this problem will not happen. I am not sure what version
Unfortunately if you execute the console command you will see the message in console, i dont think there is a way around that.
I might have just been something that was changed in skript or world guard that causes this to happen.

Right now the devs are working on the 1.13 version of skript so it might be a bit hard to report that to them.
 
Unfortunately if you execute the console command you will see the message in console, i dont think there is a way around that.
I might have just been something that was changed in skript or world guard that causes this to happen.

Right now the devs are working on the 1.13 version of skript so it might be a bit hard to report that to them.

i tried using the console command, it works but gives a massive error in the console:
 

Attachments

  • 46a30ef41e74035fcdb42b17cf370964.png
    46a30ef41e74035fcdb42b17cf370964.png
    35.3 KB · Views: 238
that is odd... what is the code you are using?
I tried this for testing and it worked
code_language.skript:
command /test:
    trigger:
        execute console command "kill %player%"
 
that is odd... what is the code you are using?
I tried this for testing and it worked
code_language.skript:
command /test:
    trigger:
        execute console command "kill %player%"

Oh well that worked.
But if i use this code:

code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        execute console command "kill %player%"

It will create the error
 
Oh well that worked.
But if i use this code:

code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        execute console command "kill %player%"

It will create the error
Are you in creative mode?
I tried in creative mode = console error
i tried in survival mode = no error
 
Oh well that worked.
But if i use this code:

code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        execute console command "kill %player%"

It will create the error
code_language.skript:
on right click:
    if event-item is..
 
Okay, this solution worked
code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        wait 1 tick
        execute console command "kill %player%"
[doublepost=1536659290,1536659256][/doublepost]
code_language.skript:
on right click:
    if event-item is..
that makes absolutely no difference
 
Okay, this solution worked
code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        wait 1 tick
        execute console command "kill %player%"
[doublepost=1536659290,1536659256][/doublepost]
that makes absolutely no difference
Thought it did lmao
 
Okay, this solution worked
code_language.skript:
on right-click:
    if tool of player is stone:
        send "&cYou are killed!"
        wait 1 tick
        execute console command "kill %player%"
[doublepost=1536659290,1536659256][/doublepost]
that makes absolutely no difference

This worked for me.
Thanks for helping me out here!
 
Status
Not open for further replies.