Hello! I'm creating a gui menu with skript below:
What im trying to do is to check the player's AP first, if player's AP is more than 0 it should open chest GUI named "Level up! Choose an attribute to upgrade!" instead of the other one. But after i reload the skript without any errors. This error appeared in the console:
I deleted the "if player's AP > 0" section and it opens the other chest perfectly. does anyone knows what happened?
Thanks! (and sorry for asking in the forum too frequently, i feel useless :/ )
code_language.skript:
command /stats:
aliases: stat
trigger:
if {classload.%player%} is set:
if {stats.ap::%player%::%{classload.%player%}%}>0:
wait 1 tick
open chest with 1 row named "Level up! Choose an attribute to upgrade!" to player
set slot 2 of player's current inventory to book named "Health" with lore "%{stats.health::%player%::%{classload.%player%}%}%"
set slot 4 of player's current inventory to book named "Mana" with lore "%{stats.mana::%player%::%{classload.%player%}%}%"
set slot 6 of player's current inventory to book named "Stamina" with lore "%{stats.stamina::%player%::%{classload.%player%}%}%"
else:
wait 1 tick
open chest with 3 row named "%{stats.sp::%player%::%{classload.%player%}%}% skill points remaining" to player
set slot 0 of player's current inventory to skull of player named "&a&l%player%'s Status" with lore "&fLevel %{class.level::%player%::%{classload.%player%}%}%||&fExp: %{class.exp::%player%::%{classload.%player%}%}% / %{class.level::%player%::%{classload.%player%}%}*1500%"
set slot 11 of player's current inventory to {stats.strength::%player%::%{classload.%player%}%} of book named "&fStrength"
set slot 12 of player's current inventory to {stats.agility::%player%::%{classload.%player%}%} of book named "&fAgility"
set slot 13 of player's current inventory to {stats.dexterity::%player%::%{classload.%player%}%} of book named "&fDexterity"
set slot 14 of player's current inventory to {stats.intelligence::%player%::%{classload.%player%}%} of book named "&fIntelligence"
set slot 15 of player's current inventory to {stats.vitality::%player%::%{classload.%player%}%} of book named "&fVitality"
set slot 8 of player's current inventory to enchanted book named "&a&lQuests"
set slot 18 of player's current inventory to firework star named "&a&lPerks"
else:
message "Load class first!" to player
What im trying to do is to check the player's AP first, if player's AP is more than 0 it should open chest GUI named "Level up! Choose an attribute to upgrade!" instead of the other one. But after i reload the skript without any errors. This error appeared in the console:
[10:09:07 INFO]: _Aryaz25_: /stat
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! [Skript] Severe Error:
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! If you're developing an add-on for Skript this likely mea
ns that you have done something wrong.
[10:09:07 ERROR]: #!#! If you're a server admin however please go to http://dev.
bukkit.org/server-mods/skript/tickets/
[10:09:07 ERROR]: #!#! and check whether this error has already been reported.
[10:09:07 ERROR]: #!#! If not please create a new ticket with a meaningful title
, copy & paste this whole error into it,
[10:09:07 ERROR]: #!#! and describe what you did before it happened and/or what
you think caused the error.
[10:09:07 ERROR]: #!#! If you think that it's a trigger that's causing the error
please post the trigger as well.
[10:09:07 ERROR]: #!#! By following this guide fixing the error should be easy a
nd done fast.
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! Stack trace:
[10:09:07 ERROR]: #!#! java.lang.IllegalArgumentException: Title cannot be longe
r than 32 characters
[10:09:07 ERROR]: #!#! at org.apache.commons.lang.Validate.isTrue(Validate.j
ava:136)
[10:09:07 ERROR]: #!#! at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftInve
ntoryCustom$MinecraftInventory.<init>(CraftInventoryCustom.java:59)
[10:09:07 ERROR]: #!#! at org.bukkit.craftbukkit.v1_8_R1.inventory.CraftInve
ntoryCustom.<init>(CraftInventoryCustom.java:32)
[10:09:07 ERROR]: #!#! at org.bukkit.craftbukkit.v1_8_R1.CraftServer.createI
nventory(CraftServer.java:1516)
[10:09:07 ERROR]: #!#! at org.bukkit.Bukkit.createInventory(Bukkit.java:934)
[10:09:07 ERROR]: #!#! at com.w00tmast3r.skquery.elements.expressions.ExprBl
ankInventories.get(ExprBlankInventories.java:36)
[10:09:07 ERROR]: #!#! at com.w00tmast3r.skquery.elements.expressions.ExprBl
ankInventories.get(ExprBlankInventories.java:14)
[10:09:07 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getArray
(SimpleExpression.java:101)
[10:09:07 ERROR]: #!#! at ch.njol.skript.lang.util.SimpleExpression.getSingl
e(SimpleExpression.java:61)
[10:09:07 ERROR]: #!#! at ch.njol.skript.effects.EffOpenInventory.execute(Ef
fOpenInventory.java:78)
[10:09:07 ERROR]: #!#! at ch.njol.skript.lang.Effect.run(Effect.java:50)
[10:09:07 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.j
ava:63)
[10:09:07 ERROR]: #!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.j
ava:91)
[10:09:07 ERROR]: #!#! at ch.njol.skript.effects.Delay$1.run(Delay.java:85)
[10:09:07 ERROR]: #!#! at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftTask
.run(CraftTask.java:71)
[10:09:07 ERROR]: #!#! at org.bukkit.craftbukkit.v1_8_R1.scheduler.CraftSche
duler.mainThreadHeartbeat(CraftScheduler.java:350)
[10:09:07 ERROR]: #!#! at net.minecraft.server.v1_8_R1.MinecraftServer.z(Min
ecraftServer.java:709)
[10:09:07 ERROR]: #!#! at net.minecraft.server.v1_8_R1.DedicatedServer.z(Ded
icatedServer.java:316)
[10:09:07 ERROR]: #!#! at net.minecraft.server.v1_8_R1.MinecraftServer.y(Min
ecraftServer.java:634)
[10:09:07 ERROR]: #!#! at net.minecraft.server.v1_8_R1.MinecraftServer.run(M
inecraftServer.java:537)
[10:09:07 ERROR]: #!#! at java.lang.Thread.run(Unknown Source)
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! Version Information:
[10:09:07 ERROR]: #!#! Skript: 2.1.2
[10:09:07 ERROR]: #!#! Bukkit: 1.8-R0.1-SNAPSHOT
[10:09:07 ERROR]: #!#! Minecraft: 1.8
[10:09:07 ERROR]: #!#! Java: 1.8.0_74
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! Running CraftBukkit: false
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! Current node: null
[10:09:07 ERROR]: #!#! Current item: open inventory to the player
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! Thread: Server thread
[10:09:07 ERROR]: #!#!
[10:09:07 ERROR]: #!#! End of Error.
[10:09:07 WARN]: #!#!
[10:09:07 WARN]: #!#! [Umbaska] List of plugins:
[10:09:07 WARN]: #!#! WorldEdit - 6.1;no_git_id, Skript - 2.1.2, Essentials - Te
amCity, GroupManager - 2.0 (Phoenix), skDragon - 0.13.1, SkQuery - 3.21.4, Proto
colLib - 3.6.4, WorldGuard - 6.1, SkinsRestorer - 10.4.4, EssentialsXMPP - TeamC
ity, EssentialsProtect - TeamCity, VoxelSniper - 5.170.0-SNAPSHOT-jnks317-gitfcb
8fe1, EssentialsChat - TeamCity, EssentialsGeoIP - TeamCity, QuarSk - 1.2.1, Vau
lt - 1.5.6-b49, EssentialsSpawn - TeamCity, Lores - 1.4.1, ServerlistMOTD - 6.0,
HolographicDisplays - 2.1.10, Citizens - 2.0.14-SNAPSHOT (build 1195), skRayFal
l - 1.9.5, MythicMobs - 4.0.1, AuthMe - 5.0-SNAPSHOT, Skellett - 1.8.8b, Umbaska
- 2.0 Beta 5.5.1, TuSKe - 1.7.4
[10:09:07 WARN]: #!#!
[10:09:07 WARN]: #!#! [Umbaska] List of addons:
[10:09:07 WARN]: #!#! Skellett v1.8.8bskDragon v0.13.1skRayFall v1.9.5Umbaska v2
.0 Beta 5.5.1SkQuery v3.21.4QuarSk v1.2.1TuSKe v1.7.4
[10:09:07 WARN]: #!#!
[10:09:07 ERROR]: #!#!
I deleted the "if player's AP > 0" section and it opens the other chest perfectly. does anyone knows what happened?
Thanks! (and sorry for asking in the forum too frequently, i feel useless :/ )