problem with a line

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

PolduZ

Member
Oct 2, 2020
31
2
8
i have been getting a console error with this line:
Code:
format gui slot 1 of player with stone named "stone" to run:
full code:
Code:
command /cmd:
    trigger:
        open virtual chest inventory with size 3 named "test" to player
        if {%player%_var} is 1:
            format gui slot 1 of player with stone named "stone" to run:
                set {%player%_var2} to "test"
also it says that the command is incomplete when i replace to run: with to do nothing and remove 1 tab in line 6
im using skellet and TuSKe
EDIT:
when i use format gui it disables all my skript commands within all files
 
Last edited:
i have been getting a console error with this line:
Code:
format gui slot 1 of player with stone named "stone" to run:
full code:
Code:
command /cmd:
    trigger:
        open virtual chest inventory with size 3 named "test" to player
        if {%player%_var} is 1:
            format gui slot 1 of player with stone named "stone" to run:
                set {%player%_var2} to "test"
also it says that the command is incomplete when i replace to run: with to do nothing and remove 1 tab in line 6
im using skellet and TuSKe
EDIT:
when i use format gui it disables all my skript commands within all files
i mentioned a console error but here you go
Code:
[10:42:21] [Server thread/ERROR]: #!#! Something went horribly wrong with Skript.
[10:42:21] [Server thread/ERROR]: #!#! This issue is NOT your fault! You probably can't fix it yourself, either.
[10:42:21] [Server thread/ERROR]: #!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
[10:42:21] [Server thread/ERROR]: #!#! Here is full list of them:
[10:42:21] [Server thread/ERROR]: #!#! TuSKe v1.8.2 (github.com/Tuke-Nuke/TuSKe) Skellett v1.9.11 (https://forums.skunity.com/resources/skellett.24/)
[10:42:21] [Server thread/ERROR]: #!#! We could not identify which of those are specially related, so this might also be Skript issue.
[10:42:21] [Server thread/ERROR]: #!#! You should try disabling those plugins one by one, trying to find which one causes it.
[10:42:21] [Server thread/ERROR]: #!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
[10:42:21] [Server thread/ERROR]: #!#! In that case, you will be given instruction on how should you report it. [10:42:21] [Server thread/ERROR]: #!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
[10:42:21] [Server thread/ERROR]: #!#! Only if the author tells you to do so, report it to Skript's issue tracker. [10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! Stack trace:
[10:42:21] [Server thread/ERROR]: #!#! java.lang.NoSuchFieldError: hasDelayBefore
[10:42:21] [Server thread/ERROR]: #!#!     at com.github.tukenuke.tuske.util.EffectSection.loadSection(EffectSection.java:111) [10:42:21] [Server thread/ERROR]: #!#!     at com.github.tukenuke.tuske.sections.gui.EffFormatGUI.init(EffFormatGUI.java:65) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:252) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.SkriptParser.parse(SkriptParser.java:179) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.lang.Condition.parse(Condition.java:80)
[10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadItems(ScriptLoader.java:1218) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.command.Commands.loadCommand(Commands.java:497)
[10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScript(ScriptLoader.java:723) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.lambda$loadScripts$5(ScriptLoader.java:537)
[10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.lambda$makeFuture$2(ScriptLoader.java:424)
[10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.makeFuture(ScriptLoader.java:440) 
[10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.loadScripts(ScriptLoader.java:536) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.ScriptLoader.reloadScript(ScriptLoader.java:1070) [10:42:21] [Server thread/ERROR]: #!#!     at ch.njol.skript.SkriptCommand.onCommand(SkriptCommand.java:165)
[10:42:21] [Server thread/ERROR]: #!#!     at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[10:42:21] [Server thread/ERROR]: #!#!     at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:159)
[10:42:21] [Server thread/ERROR]: #!#!     at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:826)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PlayerConnection.handleCommand(PlayerConnection.java:2185)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PlayerConnection.c(PlayerConnection.java:2000)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:1953)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:49)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PacketPlayInChat.a(PacketPlayInChat.java:7)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) [10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1266)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1259)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1220)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1134)
[10:42:21] [Server thread/ERROR]: #!#!     at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291)
[10:42:21] [Server thread/ERROR]: #!#!     at java.base/java.lang.Thread.run(Thread.java:831)
[10:42:21] [Server thread/ERROR]: #!#! [10:42:21] [Server thread/ERROR]: #!#! Version Information: [10:42:21] [Server thread/ERROR]: #!#!   Skript: 2.6-alpha1 (custom version)
[10:42:21] [Server thread/ERROR]: #!#!     Flavor: selfbuilt-unknown
[10:42:21] [Server thread/ERROR]: #!#!     Date: unknown
[10:42:21] [Server thread/ERROR]: #!#!   Bukkit: 1.16.5-R0.1-SNAPSHOT [10:42:21] [Server thread/ERROR]: #!#!   Minecraft: 1.16.5
[10:42:21] [Server thread/ERROR]: #!#!   Java: 16.0.1 (OpenJDK 64-Bit Server VM 16.0.1+9) [10:42:21] [Server thread/ERROR]: #!#!   OS: Linux amd64 5.4.0-67-generic
[10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! Server platform: Paper
[10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! Current node: null
[10:42:21] [Server thread/ERROR]: #!#! Current item: null
[10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! Thread: Server thread
[10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! Language: english
[10:42:21] [Server thread/ERROR]: #!#! Link parse mode: DISABLED
[10:42:21] [Server thread/ERROR]: #!#!
[10:42:21] [Server thread/ERROR]: #!#! End of Error.
[10:42:21] [Server thread/ERROR]: #!#!
 
You are using the skript version "Skript: 2.6-alpha1" which is a pre-release. It might be that maybe some addon is not working with this version of skript and therefor ruins the gui syntax
 
The following code does not require any addons to skript.
Code:
command /cmd:
  trigger:
    set {_g} to a new chest inventory with 3 row named "test"
    if {%player%_var} is 1:
      set slot 1 of {_g} to stone named "test 2"
    open {_g} to the player
    
on inventory click:
  if name of event-inventory is "test":
    cancel event
    if index of event-slot is 1:
      set {%player%_var2} to "test"

I personally do not like "format gui slot", the syntax does not make much sense... Another note is that {%player%_var} is not a good variable as it is not a list and therefore you cannot easily remove many players' variables, {var::%player%} is much better for this situation. EDIT: "::" makes a list.
 
The following code does not require any addons to skript.
Code:
command /cmd:
  trigger:
    set {_g} to a new chest inventory with 3 row named "test"
    if {%player%_var} is 1:
      set slot 1 of {_g} to stone named "test 2"
    open {_g} to the player
   
on inventory click:
  if name of event-inventory is "test":
    cancel event
    if index of event-slot is 1:
      set {%player%_var2} to "test"

I personally do not like "format gui slot", the syntax does not make much sense... Another note is that {%player%_var} is not a good variable as it is not a list and therefore you cannot easily remove many players' variables, {var::%player%} is much better for this situation. EDIT: "::" makes a list.
It was a tuske gui test skript i tried diffrent versions of skript, and addons same problem
 
The following code does not require any addons to skript.
Code:
command /cmd:
  trigger:
    set {_g} to a new chest inventory with 3 row named "test"
    if {%player%_var} is 1:
      set slot 1 of {_g} to stone named "test 2"
    open {_g} to the player
   
on inventory click:
  if name of event-inventory is "test":
    cancel event
    if index of event-slot is 1:
      set {%player%_var2} to "test"

I personally do not like "format gui slot", the syntax does not make much sense... Another note is that {%player%_var} is not a good variable as it is not a list and therefore you cannot easily remove many players' variables, {var::%player%} is much better for this situation. EDIT: "::" makes a list.

It was a tuske gui test skript i tried diffrent versions of skript, and addons same problem

Have you tried the code above? It should do what you are trying to achieve.
 
Try

Code:
command /cmd:
    trigger:
        open virtual chest inventory with size 3 named "test" to player
        if {%player%_var} is 1:
            format gui slot 1 of player with stone named "stone" to run [set {%player%_var2} to "test"]
 
Status
Not open for further replies.