...j'obtiens rien. Mais si je retire les variables dans le remove :
broadcast "%{lRdM.BlocsReconstruction.Quantite.%loop-value%}% %{_Item}%"
remove 64 pine wood planks from player's inventory
...je perds mes 64 planches et ça m'affiche : 64 pine wood planks, comme je le voulais. Le problème vient donc sûrement des variables.
J'ai donc {_Item} défini par :
set {_Item} to loop-value parsed as an item
...avec loop-value qui vaut le texte "Planks:1", lui-même défini par commande :
command /lRdM-BlocsReconstruction <text> <text> <integer=1>:
trigger:
if arg-1 is "ajout" or "ajouter" or "add":
add "%arg-2%" to {lRdM.BlocsReconstruction.Liste::*}
...et {lRdM.BlocsReconstruction.Quantite.%loop-value%} défini par :
set {lRdM.BlocsReconstruction.Quantite.%arg-2%} to {@QuantiteBloc}
...où l'option vaut 64.
Je suis un peu coincé, donc j'espère que vous saurez m'aider. Merci d'avance.
Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.
Question
Gaël Erhlich
Coucou, quand j'essaye d'exécuter cette instruction en 1.10, avec SkQuery, Umbaska et SkStuff :
remove {lRdM.BlocsReconstruction.Quantite.%loop-value%} {_Item} from player's inventory...j'ai un message d'erreur et mon plugin ne répond plus, genre ses commandes sont mortes.
[spoiler=Message d'erreur]
[19:40:55] [server thread/ERROR]: #!#! Stack trace: [19:40:55] [server thread/ERROR]: #!#! ch.njol.skript.SkriptAPIException: No class info found for faction [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.registrations.Classes.getClassInfo(Classes.java:242) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.getExprInfo(SkriptParser.java:1394) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1115) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1061) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1061) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1127) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1088) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:220) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:175) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Statement.parse(Statement.java:60) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:650) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.<init>(Conditional.java:46) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:736) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.<init>(Conditional.java:46) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:736) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Loop.<init>(Loop.java:68) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:686) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.<init>(Conditional.java:46) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:736) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional$1.<init>(Conditional.java:74) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.loadElseClause(Conditional.java:74) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:709) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.TriggerSection.<init>(TriggerSection.java:56) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.lang.Conditional.<init>(Conditional.java:46) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:736) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:510) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:268) [19:40:55] [server thread/ERROR]: #!#! at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:155) [19:40:55] [server thread/ERROR]: #!#! at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [19:40:55] [server thread/ERROR]: #!#! at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [19:40:55] [server thread/ERROR]: #!#! at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1351) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1186) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [19:40:55] [server thread/ERROR]: #!#! at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [19:40:55] [server thread/ERROR]: #!#! at java.util.concurrent.FutureTask.run(Unknown Source) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:733) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [19:40:55] [server thread/ERROR]: #!#! at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [19:40:55] [server thread/ERROR]: #!#! at java.lang.Thread.run(Unknown Source) [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! Version Information: [19:40:55] [server thread/ERROR]: #!#! Skript: 2.2-Fixes-V9b [19:40:55] [server thread/ERROR]: #!#! Bukkit: 1.10-R0.1-SNAPSHOT [19:40:55] [server thread/ERROR]: #!#! Minecraft: 1.10 [19:40:55] [server thread/ERROR]: #!#! Java: 1.8.0_101 (Java HotSpot(TM) Client VM 25.101-b13) [19:40:55] [server thread/ERROR]: #!#! OS: Windows 10 x86 10.0 [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! Running CraftBukkit: false [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! Current node: remove 12 {_Item} from player's inventory (La reconstruction de Moscou.sk, line 100) [19:40:55] [server thread/ERROR]: #!#! Current item: null [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! Thread: Server thread [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! End of Error. [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! List of plugins: [19:40:55] [server thread/ERROR]: #!#! WorldEdit - 6.1.3;7a097ca, Skript - 2.2-Fixes-V9b, Essentials - 2.0.1-b${BUILD_NUMBER}, SkStuff - 1.6.3.6, Umbaska - 2.0 Beta 5.5.1 for Minecraft 1.10, SkQuery - 3.21.4 [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#! List of addons: [19:40:55] [server thread/ERROR]: #!#! Umbaska v2.0 Beta 5.5.1 for Minecraft 1.10SkQuery v3.21.4SkStuff v1.6.3.6 [19:40:55] [server thread/ERROR]: #!#! [19:40:55] [server thread/ERROR]: #!#!Si j'ajoute ça sur la ligne au dessus :
broadcast "%{lRdM.BlocsReconstruction.Quantite.%loop-value%}% %{_Item}%"...j'obtiens rien. Mais si je retire les variables dans le remove :
broadcast "%{lRdM.BlocsReconstruction.Quantite.%loop-value%}% %{_Item}%" remove 64 pine wood planks from player's inventory...je perds mes 64 planches et ça m'affiche : 64 pine wood planks, comme je le voulais. Le problème vient donc sûrement des variables.
J'ai donc {_Item} défini par :
set {_Item} to loop-value parsed as an item...avec loop-value qui vaut le texte "Planks:1", lui-même défini par commande :
command /lRdM-BlocsReconstruction <text> <text> <integer=1>: trigger: if arg-1 is "ajout" or "ajouter" or "add": add "%arg-2%" to {lRdM.BlocsReconstruction.Liste::*}...et {lRdM.BlocsReconstruction.Quantite.%loop-value%} défini par :
set {lRdM.BlocsReconstruction.Quantite.%arg-2%} to {@QuantiteBloc}...où l'option vaut 64.
Je suis un peu coincé, donc j'espère que vous saurez m'aider. Merci d'avance.
2 réponses à cette question
Messages recommandés