1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Another stupid bug I haven't found out how to fix

Discussion in 'Skript' started by Sphro, Jan 20, 2018.

Thread Status:
Not open for further replies.
  1. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    Skript Version: Skript 2.1.2
    Skript Author: Njol
    Minecraft Version: 1.8

    SkQuery Version: SkQuery 3.21.4
    SkQuery Author: w00tmast3r

    So there's this Format Slot error with SkQuery that has officially come my way to bother me and to not know how to fix regardless of how many articles and researches online i've had to dig through to see if any work. That being said, here's the error.

    http://prntscr.com/i2zord

    Code (Skript):
    1. on join:
    2.         wait a tick
    3.         format slot 0 of the player with compass named "&a&lServer Selecter &7(Right-click)"
    4.         teleport player to {tele.hub}
    5.  
    Also. I host a BungeeCord network of about 6 servers. All duplicate Skript and SkQuery .jar files. I've copied them from a proxy that suddenly knows how to comply with this skript. I'm getting this error on the Lobby/Hub, even though i'd plug it in to my Practice server and it'd work fine even though it's based off the same .jar file.
     
  2. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Format slot only works in player's open inventories (aka GUI). To set a player's slot in their hotbar (or inside their player inventory), simply do
    Code (Skript):
    1. set slot 0 of player to compass named "insert name here"
     
  3. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    Do the code works fine? I thought it need 'player's current inventory'

    Code (Skript):
    1. set slot 0 of player's current inventory to compass named "..."
     
  4. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    That's is true when dealing with a gui. Since he isn't trying to place the compass in a gui and rather give it directly to a player in a specific slot then he doesn't need to add "player's current inventory"
     
  5. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    Did this. Then I got a CONSOLE error + "An internal error occurred while attempting to perform this command."
    Code (Skript):
    1. [17:39:15] [Server thread/INFO]: Sphro issued server command: /slot set 10
    2. [17:39:15] [Server thread/INFO]: Sphro: /slot set 10
    3. [17:39:15] [Server thread/ERROR]: #!#!
    4. [17:39:15] [Server thread/ERROR]: #!#! [Skript] Severe Error:
    5. [17:39:15] [Server thread/ERROR]: #!#!
    6. [17:39:15] [Server thread/ERROR]: #!#! If you're developing an add-on for Skript this likely means that you have done something wrong.
    7. [17:39:15] [Server thread/ERROR]: #!#! If you're a server admin however please go to http://dev.bukkit.org/server-mods/skript/tickets/
    8. [17:39:15] [Server thread/ERROR]: #!#! and check whether this error has already been reported.
    9. [17:39:15] [Server thread/ERROR]: #!#! If not please create a new ticket with a meaningful title, copy & paste this whole error into it,
    10. [17:39:15] [Server thread/ERROR]: #!#! and describe what you did before it happened and/or what you think caused the error.
    11. [17:39:15] [Server thread/ERROR]: #!#! If you think that it's a trigger that's causing the error please post the trigger as well.
    12. [17:39:15] [Server thread/ERROR]: #!#! By following this guide fixing the error should be easy and done fast.
    13. [17:39:15] [Server thread/ERROR]: #!#!
    14. [17:39:15] [Server thread/ERROR]: #!#! Stack trace:
    15. [17:39:15] [Server thread/ERROR]: #!#! java.lang.ArrayIndexOutOfBoundsException: 9
    16. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.InventoryCrafting.setItem(InventoryCrafting.java:128)
    17. [17:39:15] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryCrafting.setItem(CraftInventoryCrafting.java:83)
    18. [17:39:15] [Server thread/ERROR]: #!#!     at com.w00tmast3r.skquery.elements.expressions.ExprItemInInventory$1.setItem(ExprItemInInventory.java:38)
    19. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.classes.data.SkriptClasses$17.change(SkriptClasses.java:639)
    20. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.classes.data.SkriptClasses$17.change(SkriptClasses.java:1)
    21. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.util.SimpleExpression.change(SimpleExpression.java:233)
    22. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.effects.EffChange.execute(EffChange.java:273)
    23. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Effect.run(Effect.java:50)
    24. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63)
    25. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91)
    26. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Trigger.execute(Trigger.java:53)
    27. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:220)
    28. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:1)
    29. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.util.Task.callSync(Task.java:139)
    30. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:193)
    31. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.handleCommand(Commands.java:260)
    32. [17:39:15] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:155)
    33. [17:39:15] [Server thread/ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    34. [17:39:15] [Server thread/ERROR]: #!#!     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    35. [17:39:15] [Server thread/ERROR]: #!#!     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    36. [17:39:15] [Server thread/ERROR]: #!#!     at java.lang.reflect.Method.invoke(Method.java:498)
    37. [17:39:15] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
    38. [17:39:15] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    39. [17:39:15] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502)
    40. [17:39:15] [Server thread/ERROR]: #!#!     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487)
    41. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.handleCommand(PlayerConnection.java:1154)
    42. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:997)
    43. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:45)
    44. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PacketPlayInChat.a(PacketPlayInChat.java:1)
    45. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13)
    46. [17:39:15] [Server thread/ERROR]: #!#!     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    47. [17:39:15] [Server thread/ERROR]: #!#!     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    48. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44)
    49. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715)
    50. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374)
    51. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654)
    52. [17:39:15] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557)
    53. [17:39:15] [Server thread/ERROR]: #!#!     at java.lang.Thread.run(Thread.java:745)
    54. [17:39:15] [Server thread/ERROR]: #!#!
    55. [17:39:15] [Server thread/ERROR]: #!#! Version Information:
    56. [17:39:15] [Server thread/ERROR]: #!#!   Skript: 2.1.2
    57. [17:39:15] [Server thread/ERROR]: #!#!   Bukkit: 1.8.8-R0.1-SNAPSHOT
    58. [17:39:15] [Server thread/ERROR]: #!#!   Minecraft: 1.8.8
    59. [17:39:15] [Server thread/ERROR]: #!#!   Java: 1.8.0_91
    60. [17:39:15] [Server thread/ERROR]: #!#!
    61. [17:39:15] [Server thread/ERROR]: #!#! Running CraftBukkit: false
    62. [17:39:15] [Server thread/ERROR]: #!#!
    63. [17:39:15] [Server thread/ERROR]: #!#! Current node: null
    64. [17:39:15] [Server thread/ERROR]: #!#! Current item: set slot to [[itemtype:compass]] named "..."
    65. [17:39:15] [Server thread/ERROR]: #!#!
    66. [17:39:15] [Server thread/ERROR]: #!#! Thread: Server thread
    67. [17:39:15] [Server thread/ERROR]: #!#!
    68. [17:39:15] [Server thread/ERROR]: #!#! End of Error.
    69. [17:39:15] [Server thread/ERROR]: #!#!
    70.  
    I'm using this command to diagnose the slots I need for when people login to the hub (1st slot in hotbar):
    Code (Skript):
    1. command /slot [<text>] [<number>]:
    2.     trigger:
    3.         if arg-1 is not set:
    4.             message "&cSpecify an argument"
    5.         else if arg-1 is "set":
    6.             set slot arg-2 of player's current inventory to compass named "..."
     
  6. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    replace it with
    Code (Skript):
    1. set slot arg-2 of player to compass named "..."
    if that doesn't work check your aliases file and see what the alias for a compass is
     
  7. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    870
    Likes Received:
    139
    Medals:
    Update your skript you are incredibly out of date
     
  8. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    Nothing's wrong with the Skript version i'm using.
     
  9. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    870
    Likes Received:
    139
    Medals:
    oh of course not, i guess you know better seeing as you are the one asking for help
     
  10. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    You really don't think I know what i'm doing don't you
     
  11. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    870
    Likes Received:
    139
    Medals:
    no i dont, your on the help forums
     
  12. MartinOdum

    MartinOdum Member

    Joined:
    Jan 26, 2017
    Messages:
    112
    Likes Received:
    13
    just update skript dude, if there is a reason you're on such an outdated version atleast explain it. Otherwise everyone will tell you to updated it, thats probably why you are getting errors because nothing seems to be wrong with that code
     
  13. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    I'm on the help forums because nothing works looking it up online... Threads like these come up in search results and fix problems OTHER people have. I have about 40+ skripts in a 2 month span and only requested help twice.
    --- Double Post Merged, Jan 27, 2018, Original Post Date: Jan 27, 2018 ---
    Last I updated skript, half my skripts broke. And, this problem consists of SkQuery.
     
  14. White

    White Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    445
    Likes Received:
    25
    Your scripts mostly broke because Bensku's skript has slight changes to the code. They are easily fixable. At this point, nobody should be using 2.1.2 on 1.8 because there are problems with it.
     
  15. Pikachu

    Supporter Addon Developer

    Joined:
    Jan 25, 2017
    Messages:
    870
    Likes Received:
    139
    Medals:
    Actually, they most likely broke because of an error related to lambdas. If only he would accept help...
     
  16. Sphro

    Sphro Member

    Joined:
    May 28, 2017
    Messages:
    18
    Likes Received:
    0
    What do you mean I don't accept help? lmfao, that's why I made this thread
    --- Double Post Merged, Jan 29, 2018, Original Post Date: Jan 29, 2018 ---
    Never mind everybody. Works as good as new now. Not sure how, but managed to fix itself lol
     
Thread Status:
Not open for further replies.

Share This Page

Loading...