Solved Command recognizion don't very fine lastly

  • 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 community!

    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.

Aidanete

Active Member
Apr 11, 2017
139
10
0
Here is my problem, this happened to me a few hours ago. Some commands I create aren't detected by the game:

This was my last problem:
code_language.skript:
command //editables:
    trigger:
        loop {editable::*}:
            apply glowing to loop-index for 3 seconds
        wait 3 seconds
        loop {editable::*}:
            remove glowing from loop-index
The game directly detect it as non-existant command, the "Unknown command" message is dropped in chat and I don't know what to do.

The other command was with a custom effect, no error log in output in both cases, both commands have no correlation between or similar features. I tested now with the old command that happened and didn't work also.

Old command:
code_language.skript:
command /rel:
trigger:
reload the script "Shotgun"

Please, help, and thank you!
 
Last edited:
  1. command //editables: <<<----- you have two / ... just use one
 
Yes, I know but I have more commands with two / and work fine and sometimes this bug happened in commands with only 1 /, and yes, I tried with only 1 / and didn't worked :emoji_frowning:
 
I threw your command in a test skript and got this error
code_language.skript:
[13:17:18 INFO]: [Skript] Reloading test.sk...
[13:17:18 ERROR]: loop-index is not a living entity (test.sk, line 76: apply glowing to loop-index for 3 seconds')
[13:17:18 ERROR]: loop-index can't have anything removed from it (test.sk, line 79: remove glowing from loop-index')
 
Okay, loop-index is because the loop-index of the list in the loop event is supposed to be an entity, so I don't know. But the problem is that my script directly don't recognise the command, as it were not existing
 
Parse loop-index as an entity and try again
 
I don't know if it works, because the problem is that MC doesn't read the command. When I place the command, this happens
lpf9hqR.png

Note that in the console it's showing an error with the code "apply glowing to loop-index for 3 seconds" as a fatal server error, this is the only error that shows, anyway, there are many other commands that do this same error and don't output a stacktrace like this
 
Can you show us the code where you set the list variable {editable::*}?
 
code_language.skript:
on rightclick:
    targeted entity is a living entity:
        player is holding a golden axe named "<gold><bold>Entity Wand":
            set {editable::%targeted entity%} to true
            message "<magenta>Entity made editable"
on leftclick:
    targeted entity is a living entity:
        player is holding a golden axe named "<gold><bold>Entity Wand":
            delete {editable::%targeted entity%}
            message "<magenta>Entity no longer editable"
 
code_language.skript:
on rightclick:
    targeted entity is a living entity:
        player is holding a golden axe named "<gold><bold>Entity Wand":
            set {editable::%targeted entity%} to true
            message "<magenta>Entity made editable"
on leftclick:
    targeted entity is a living entity:
        player is holding a golden axe named "<gold><bold>Entity Wand":
            delete {editable::%targeted entity%}
            message "<magenta>Entity no longer editable"
Okay so the problem here is that whenever you use a object inside of a variable (like this: {editable::%targeted entity%}) it will parse the object as a text. So basically the thing you're saving with this code is this: {editable::cow} = true (if it's a cow of course). And whenever you want to get that entity back in another code, it's parsed as a text, not as the type it was beforehand. And when you parse an entity as a text, the text only has the entity type. This way you can parse it as an entity, but the entity won't be specified (it's trying to parse "cow" as an entity, that will work, but it doesn't know which cow on the server). You will have to use a different method for this to work. Perhaps adding the entity to a list variable (not as an index)
 
I tried multiple methods but the game says that entities can't be saved in variables. I tried with UUIDs but I don't know how to do it, do you know?

The problem still being that the server don't recognise the command
 
I tried multiple methods but the game says that entities can't be saved in variables. I tried with UUIDs but I don't know how to do it, do you know?
Entities can be saved in variables, but will be deleted after restart. Skript gives a warning about it, not an error. Depending on if you want it to work after restarts you can save the entities in variables or use these: Entity UUID and Entity from UUID
 
Okay, so if I save the entity's UUID in the variable, what I can do?
Then you use the two links I put to get the entity back from the uuid saved in the variable, and do stuff with that entity
 
In strange circunstances, the glitch of the command don't recognized dissappeared, but the command don't do the thing I wanted, anyway, I found a way to do it better. Thank you!
 
Status
Not open for further replies.