Aller au contenu
  • 0

Aide sur un skript déjà construit (corrigé bug)


Question

Posté(e)

Bonjours ou bonsoir à tous '-'

 

j'ai juste un léger problème mais qui me bloque tout è.é

 

command /moneyd <int>:
   trigger:
       if arg-1 is between 1 and 9:
           if player's inventory contains clay bricks:
               remove %arg-1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg-1%"
       if arg-1 is between 10 and 90:
           if player's inventory contains clay bricks:
               remove %arg-1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg-1%"
       if arg-1 is between 100 and 90000:
           if player's inventory contains clay bricks:
               remove %arg-1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg-1%"

Au cas ou vous en l'aviez pas compris je veux que quand on fait la commande /moneyd <nombre>

si c'est entre 1 et 9 par exemple 8 je veux que ça remove 8 brick et que ça remplace par 8 money ( economy)

 

[serveur RPG] donc clay brick est enfaite du bronze et du bronze = 1 argent = 10 1or = 100

 

le problème c'est que celà ne marche pas sûrement car j'utilise mal les variables ....

 

l'erreure dit : que je ne peux pas remove %arg-1% clay bricks car ce n'est pas un item type ...

18 réponses à cette question

Messages recommandés

  • 0
Posté(e)

les quels arg ?

 

Nouveau code et ne marche toujours pas avec la même érreures vérifié plutôt la syntaxe de mon skript je pense que je l'ai mal construit:

 

command /moneyd <int>:
   trigger:
       if arg-1 is between 1 and 9:
           if player's inventory contains clay bricks:
               remove %arg 1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"
       if arg-1 is between 10 and 90:
           if player's inventory contains clay bricks:
               remove %arg 1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"
       if arg-1 is between 100 and 90000:
           if player's inventory contains clay bricks:
               remove %arg 1% clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"

  • 0
Posté(e)

command /moneyd <number>:

trigger:

if arg-1 is between 1 and 9:

if player's inventory contains clay bricks:

remove arg 1 clay bricks from player's inventory

execute console command "/economy give %player% %arg 1%"

if arg-1 is between 10 and 90:

if player's inventory contains clay bricks:

remove arg 1 clay bricks from player's inventory

execute console command "/economy give %player% %arg 1%"

if arg-1 is between 100 and 90000:

if player's inventory contains clay bricks:

remove arg 1 clay bricks from player's inventory

execute console command "/economy give %player% %arg 1%"

 

 

Essayez ça (tab a refaire :3).

  • 0
Posté(e)

pas tester mais devrait être ok ;)

command /moneyd <int>:
   trigger:
       if arg 1 is between 1 and 9:
           if player's inventory contains clay bricks:
               remove arg 1 clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"
       if arg 1 is between 10 and 90:
           if player's inventory contains clay bricks:
               remove arg 1 clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"
       if arg 1 is between 100 and 90000:
           if player's inventory contains clay bricks:
               remove arg 1 clay bricks from player's inventory
               execute console command "/economy give %player% %arg 1%"

  • 0
Posté(e)

je vais tester tout ça dès maintenant je vous refait signe si c'est bon encore merci de votre passiente

 

le problème c'est que le joueurs peut se givé 50000 money parcequ'il n'a que 1 clay brick ... faudrait qu'ils puissent faire la commande si il a les 50000 brick

  • 0
Posté(e)
command /moneyd <integer>:
   trigger:
       if amount of clay bricks in player's inventory is more than 0:
           while amount of clay bricks in player's inventory is more than 0:
               remove 1 clay bricks from player's inventory
               add 1 to {_Lingots}
               if {_Lingots} is more than or equals to arg-1:
                   exit 2 sections
           execute console command "/economy give %player% %{_Lingots}%"
       else:
           send "&eTu n'as pas de &clingots d'argile&e. :c"

  • 0
Posté(e)
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! [skript] Severe Error:
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
[14:44:20] [server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
[14:44:20] [server thread/ERROR]: #!#! and check whether this error has already been reported.
[14:44:20] [server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
[14:44:20] [server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
[14:44:20] [server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
[14:44:20] [server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! Stack trace:
[14:44:20] [server thread/ERROR]: #!#! java.lang.IllegalArgumentException: Title cannot be longer than 32 characters
[14:44:20] [server thread/ERROR]: #!#!     at org.apache.commons.lang.Validate.isTrue(Validate.java:136)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom$MinecraftInventory.<init>(CraftInventoryCustom.java:59)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCustom.<init>(CraftInventoryCustom.java:32)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.CraftServer.createInventory(CraftServer.java:1525)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.Bukkit.createInventory(Bukkit.java:938)
[14:44:20] [server thread/ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprBlankInventories.get(ExprBlankInventories.java:36)
[14:44:20] [server thread/ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprBlankInventories.get(ExprBlankInventories.java:14)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:101)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.getSingle(SimpleExpression.java:61)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.effects.EffOpenInventory.execute(EffOpenInventory.java:78)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:50)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:220)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:1)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.util.Task.callSync(Task.java:139)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:193)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:263)
[14:44:20] [server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:158)
[14:44:20] [server thread/ERROR]: #!#!     at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)
[14:44:20] [server thread/ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[14:44:20] [server thread/ERROR]: #!#!     at java.lang.reflect.Method.invoke(Method.java:498)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
[14:44:20] [server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
[14:44:20] [server thread/ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[14:44:20] [server thread/ERROR]: #!#!     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
[14:44:20] [server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
[14:44:20] [server thread/ERROR]: #!#!     at java.lang.Thread.run(Thread.java:745)
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! Version Information:
[14:44:20] [server thread/ERROR]: #!#!   Skript: 2.1.2
[14:44:20] [server thread/ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
[14:44:20] [server thread/ERROR]: #!#!   Minecraft: 1.8.8
[14:44:20] [server thread/ERROR]: #!#!   Java: 1.8.0_72
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! Running CraftBukkit: false
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! Current node: null
[14:44:20] [server thread/ERROR]: #!#! Current item: open inventory to the player
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! Thread: Server thread
[14:44:20] [server thread/ERROR]: #!#!
[14:44:20] [server thread/ERROR]: #!#! End of Error.
[14:44:20] [server thread/ERROR]: #!#! 

×
×
  • Créer...

Information importante

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.