So I have this profile selection menu that i'm working on.
There's a problem with my "Profile Management" GUI.
Since Skript is the most buggy and underdeveloped plugin in existance, it can't do what normal languages do, and instead throws an error at you and expects you to understand wtf is happening.
The manage2 and del2P functions are the problem.
Dunno what's happening.
There's a problem with my "Profile Management" GUI.
Since Skript is the most buggy and underdeveloped plugin in existance, it can't do what normal languages do, and instead throws an error at you and expects you to understand wtf is happening.
Code:
command /profiles:
trigger:
open virtual chest inventory with size 1 named "Profile Selection" to player
format gui slot (all integers between 0 and 8) of player with light gray stained glass pane named " "
format gui slot 3 of player with shiny book named "&a%{p1name.%player's uuid%}% &a(Current)" with lore "&aKills&f: %{p1kills.%player's uuid%}%", "&cDeaths&f: %{p1deaths.%player's uuid%}%" and "&bMoney&f: %{p1bal.%player's uuid%}%"
if {profiles.%player's uuid%} is 1:
format gui slot 5 of player with barrier named "&aCreate a new profile!" to run function newProfile(player)
else if {profiles.%player's uuid%} is 2:
if {pint.%player's uuid%} is 1:
format gui slot 5 of player with book named "&cProfile 2" with lore "&aKills&f: %{p2kills.%player's uuid%}%", "&cDeaths&f: %{p2deaths.%player's uuid%}%" and "&bMoney&f: %{p2bal.%player's uuid%}%" to run function manage2(player)
else if {pint.%player's uuid%} is 2:
format gui slot 3 of player with book named "&cProfile 1" with lore "&aKills&f: %{p1kills.%player's uuid%}%", "&cDeaths&f: %{p1deaths.%player's uuid%}%" and "&bMoney&f: %{p1bal.%player's uuid%}%" to run function profile1(player)
format gui slot 5 of player with shiny book named "&aProfile 2 &a(Current)" with lore "&aKills&f: %{p2kills.%player's uuid%}%", "&cDeaths&f: %{p2deaths.%player's uuid%}%" and "&bMoney&f: %{p2bal.%player's uuid%}%"
function profile1(p: player):
set {_pu} to uuid of {_p}
set {pint.%{_pu}%} to 1
delete {p2inventory.%{_pu}%::*}
loop all items in {_p}'s inventory:
add loop-item to {p2inventory.%{_pu}%::*}
clear {_p}'s inventory
add {p1inventory.%{_pu}%::*} to {_p}'s inventory
close {_p}'s inventory
kill {_p}
function profile2(p: player):
set {_pu} to uuid of {_p}
set {pint.%{_pu}%} to 2
delete {p1inventory.%{_pu}%::*}
loop all items in {_p}'s inventory:
add loop-item to {p1inventory.%{_pu}%::*}
clear {_p}'s inventory
add {p2inventory.%{_pu}%::*} to {_p}'s inventory
close {_p}'s inventory
kill {_p}
function manage2(p: player):
close {_p}'s inventory
open virtual chest inventory with size 1 named "Profile Management" to {_p}
format gui slot (all integers between 0 and 8) of {_p} with light gray stained glass pane named " "
format gui slot 2 of {_p} with paper named "&aSwitch to profile" to run function profile2(%{_p}%)
format gui slot 4 of {_p} with birch sign named "&eGo Back" to close then run {_p} command "/profiles"
format gui slot 6 of {_p} with barrier named "&cDelete profile" with lore "&4WARNING: THERE IS NO CONFIRMATION", "&4AS SOON AS YOU CLICK THIS YOUR" and "&4PROFILE IS DELETED" to run function delP2(%{_p}%)
function delP2(p: player):
set {_u} to {_p}'s uuid
send "&cDeleting profile!" to {_p}
delete {p2inventory.%{_u}%::*}
set {profiles.%{_u}%} to 1
close {_p}'s inventory
send title "&aProfile succesfully deleted!" to {_p}
function newProfile(p: player):
send "&7Making some space..." to {_p}
set {_pu} to uuid of {_p}
loop all items in {_p}'s inventory:
add loop-item to {p1inventory.%{_pu}%::*}
clear {_p}'s inventory
send "&7Creating profile..." to {_p}
set {profiles.%{_pu}%} to 2
set {pint.%{_pu}%} to 2
close {_p}'s inventory
kill {_p}
send "&7Profile created!" to {_p}
The manage2 and del2P functions are the problem.
Dunno what's happening.
[Mon, 16. Mar 2020 02:11:48 GMT INFO] ADMIN bear_attack_man | Elite Hawk: gucci gang [Mon, 16. Mar 2020 02:11:51 GMT INFO] bear_attack_man issued server command: /profiles [Mon, 16. Mar 2020 02:11:51 GMT INFO] bear_attack_man c8d10-f19f-420a-9a3d-faf8460f3757]: /profiles
[3:11 PM]
[Mon, 16. Mar 2020 02:11:54 GMT ERROR] Could not pass event InventoryClickEvent to Skript v2.4.1-MH [Mon, 16. Mar 2020 02:11:55 GMT ERROR] Could not pass event InventoryClickEvent to Skript v2.4.1-MH [Mon, 16. Mar 2020 02:11:56 GMT INFO] bear_attack_man c8d10-f19f-420a-9a3d-faf8460f3757]: /profiles
[3:11 PM]
[Mon, 16. Mar 2020 02:11:54 GMT ERROR] Could not pass event InventoryClickEvent to Skript v2.4.1-MH [Mon, 16. Mar 2020 02:11:55 GMT ERROR] Could not pass event InventoryClickEvent to Skript v2.4.1-MH [Mon, 16. Mar 2020 02:11:56 GMT INFO] bear_attack_man c8d10-f19f-420a-9a3d-faf8460f3757]: /profiles