Solved gui problem

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

Hartvig

Member
Apr 18, 2017
39
1
0
22
Problem:
I can't make an item in my gui, the 4 red glass panes work, but it's dosen't work.

Skript addons:

Skript
skDragon
ExertSK
skUtilites
LargeSk
TuSKe
SkAction
skRayFall
WildSkript
RandomSK
SkQuery
ExtrasSK
SkStuff

Error:
https://gyazo.com/992505b0e2b4f7dbd98a63e04c154b53

Code:
code_language.skript:
if arg 1 is "farve":
            if {team.%player%} is set:
                if {team.owner.%{team.%player%}%} is player:
                    open chest with 2 rows named "&4Vælg din team farve" to player
                    wait 3 ticks
                    format slot 0 of player with red glass pane named " " with lore " " to be unstealable
                    format slot 8 of player with red glass pane named " " with lore " " to be unstealable
                    format slot 9 of player with red glass pane named " " with lore " " to be unstealable
                    format slot 17 of player with red glass pane named " " with lore " " to be unstealable
                    format slot 1 of player with white wool named "&f&lHvid" with lore "&aTryk for at vælge &f&lHvid|| &asom dit teams farve" to close then run [ execute player command "/teamfarvesæt f"]
                    format slot 2 of player with red wool named "&4&lRød" with lore "&aTryk for at vælge &4&lRød|| &asom dit teams farve" to close then run [ execute player command "/teamfarvesæt 4"]
                    format slot 3 of player with green wool named "&2&lGrøn" with lore "&aTryk for at vælge &2&Grøn|| &asom dit teams farve" to close then run [ execute player command "/teamfarvesæt 2"]
                    format slot 5 of player with purple wool named "&5&lLilla" with lore "&aTryk for at vælge &f&lLilla|| &asom dit teams farve" to close then run [ execute player command "/teamfarvesæt 5"]
                    format slot 6 of player with blue wool named "&1&lBlå" with lore "&aTryk for at vælge &b&lBlå|| &asom dit teams farve" to close then run [ execute player command "/teamfarvesæt 1"]
                else:
                    send "&cDu ejer ikke teamet"
            else:
                send "&cDu skal være en del af et team for at kunne gøre dette"
 
Thank you, but i have a nother problem.

I don't get any errors, and all seems to work, but it dosen't subtract 50 from the teams balance, i've tried "if {team.eco.%{team.%player%}%} is greater than 49:" but that dosen't work
code_language.skript:
command /teamfarvesæt [<text>]:
    trigger:
        if arg 1 is not set:
            stop
        if arg 1 is "f":
            if {team.owner.%{team.%player%}%} is player:
                subtract 50 from {team.eco.%{team.%player%}%}
                set {team.farve.%{team.%player%}%} to "&f"
        if arg 1 is "4":
            if {team.owner.%{team.%player%}%} is player:
                subtract 50 from {team.eco.%{team.%player%}%}
                set {team.farve.%{team.%player%}%} to "&4"
        if arg 1 is "2":
            if {team.owner.%{team.%player%}%} is player:
                subtract 50 from {team.eco.%{team.%player%}%}
                set {team.farve.%{team.%player%}%} to "&2"
        if arg 1 is "5":
            if {team.owner.%{team.%player%}%} is player:
                subtract 50 from {team.eco.%{team.%player%}%}
                set {team.farve.%{team.%player%}%} to "&5"
        if arg 1 is "1":
            if {team.owner.%{team.%player%}%} is player:
                subtract 50 from {team.eco.%{team.%player%}%}
                set {team.farve.%{team.%player%}%} to "&1"
command /team [<text>] [<text>] [<text>]:
        if arg 1 is "penge":
            if {team.%player%} is set:
                send " "
                send "&7Dit team har %{team.farve.%{team.%player%}%}%%{team.eco%{team.%player%}%}% &aKroner &7på dens konto"
                send " "
        if arg 1 is "deposit":
            if {team.%player%} is set:
                if player's balance is greater than arg 2 parsed as a integer -1:
                    subtract arg 2 parsed as a integer from player's balance
                    add arg 2 parsed as a integer to {team.eco%{team.%player%}%}
                    send " "
                    send "&7Du overførte %{team.farve.%{team.%player%}%}%%arg 2% &akroner &7til dit team"
                    send " "
                    send "&a%player% &7Overførte %{team.farve.%{team.%player%}%}%%arg 2% &aKroner &7til teamet" to {team.owner.%{team.%player%}%}
                else:
                    send "&cDu har ikke penge nok"
            else:
                send "&cDu skal være en del af et team"
 
Status
Not open for further replies.