RandomSK MetaData

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

bertek41

Member
Jan 26, 2017
51
7
8
29
Skript:
code_language.skript:
command /hey:
    trigger:
        if entity's target is a villager:
            if target entity's display name is "&6&lBankacı Mülayim":
                set metadata value "NPC" of target-entity to "true"
                broadcast "yeah"
Errors:
Java:
[12:23:28] [Server thread/INFO]: YasinSubasi [e55b2750-1d94-31e9-9778-354c7d0522e0]: /hey
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! [Skript] Severe Error:
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[12:23:28] [Server thread/ERROR]: #!#! If you're a server admin however please go to https://github.com/bensku/Skript/issues/
[12:23:28] [Server thread/ERROR]: #!#! and check whether this error has already been reported.
[12:23:28] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it (or use paste service),
[12:23:28] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[12:23:28] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[12:23:28] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! Stack trace:
[12:23:28] [Server thread/ERROR]: #!#! ch.njol.skript.SkriptAPIException: UnparsedLiterals must be converted before use
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.UnparsedLiteral.invalidAccessException(UnparsedLiteral.java:275)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.UnparsedLiteral.getSingle(UnparsedLiteral.java:305)
[12:23:28] [Server thread/ERROR]: #!#!     at com.mirre.random.lang.data.lists.ExpressionList.catchAnyNull(ExpressionList.java:56)
[12:23:28] [Server thread/ERROR]: #!#!     at com.mirre.random.lang.RandomExpression.change(RandomExpression.java:65)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:273)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:54)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:65)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:93)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:222)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:184)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:270)
[12:23:28] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:165)
[12:23:28] [Server thread/ERROR]: #!#!     at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
[12:23:28] [Server thread/ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:23:28] [Server thread/ERROR]: #!#!     at java.lang.reflect.Method.invoke(Method.java:498)
[12:23:28] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
[12:23:28] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[12:23:28] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[12:23:28] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[12:23:28] [Server thread/ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[12:23:28] [Server thread/ERROR]: #!#!     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
[12:23:28] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
[12:23:28] [Server thread/ERROR]: #!#!     at java.lang.Thread.run(Thread.java:745)
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! Version Information:
[12:23:28] [Server thread/ERROR]: #!#!   Skript: 2.2-dev20
[12:23:28] [Server thread/ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[12:23:28] [Server thread/ERROR]: #!#!   Minecraft: 1.8.8
[12:23:28] [Server thread/ERROR]: #!#!   Java: 1.8.0_101 (Java HotSpot(TM) 64-Bit Server VM 25.101-b13)
[12:23:28] [Server thread/ERROR]: #!#!   OS: Linux amd64 4.4.26-nitradoV3-MC-1000-nH-dP-d-i
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! Running CraftBukkit: false
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! Current node: null
[12:23:28] [Server thread/ERROR]: #!#! Current item: set ExprMetadata to "true"
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! Thread: Server thread
[12:23:28] [Server thread/ERROR]: #!#!
[12:23:28] [Server thread/ERROR]: #!#! End of Error.
[12:23:28] [Server thread/ERROR]: #!#!
 
Try this code;
code_language.skript:
command /hey:
    trigger:
        if entity's target is a villager:
            if target entity's display name is "&6&lBankacı Mülayim":
                set metadata "NPC" of target entity to "true"
                broadcast "%metadata ""NPC"" of target entity%"
 
I solved that problem:
code_language.skript:
command /hey:
    trigger:
        set metadata "NPC" of target entity to "true"
        broadcast "hay"
(with Skellett)
 
  • Like
Reactions: LimeGlass
Status
Not open for further replies.