How do I fix this lambda statement error?

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

Ah_Roon

Member
Feb 18, 2018
2
0
0
21
Skript Version: Skript 2.1.2
Skript Author: Bensku
Minecraft Version: Spigot 1.8.8 / My Client: 1.8.9 Forge
---
Full Code:
Note: If the code is too large, feel free to use a pasting website (Pastebin or hastebin)
Note: If a variable is being set in another script, but not shown, please explain how they are being set


code_language.skript:
#--------------------------------------#
#         GunsterMC Punishment GUI       #
#               by Ah_Roon                   #
#--------------------------------------#
# Special thanks to Boobah, pajokiller #
# For providing an Skript!             #
#--------------------------------------#
command /p [<offline player>] [<text>]:
    aliases: /punish
    permission: punishment.trainee
    permission message: &c&lPERMISSIONS&f&l>&7&l> &rYou are not allowed to use this command!
    trigger:
        if arg-2 is not set:
            send "&9&lCOMMAND&f&l>&7&l> &rCommand usage:"
            send "&7/&6punish&r <player> <reason>"
        if arg-2 is set:
            if {p.%arg-1%::Chat1} is not set:
                set {p.%arg-1%::General} to "ban %arg-1% 30m"
                set {p.%arg-1%::GeneralL1} to "&fBan Duration: &e30 Minutes"
                set {p.%arg-1%::General2} to "ban %arg-1% 1h"
                set {p.%arg-1%::GeneralL2} to "&fBan Duration: &e1 Hour"
                set {p.%arg-1%::General3} to "ban %arg-1% 2h"
                set {p.%arg-1%::GeneralL3} to "&fBan Duration: &e2 Hours"
                set {p.%arg-1%::General4} to "ban %arg-1% 1d"
                set {p.%arg-1%::GeneralL4} to "&fBan Duration: &e1 Day"
                set {p.%arg-1%::General4} to "ban %arg-1% 30d"
                set {p.%arg-1%::GeneralL4} to "&fBan Duration: &e30 Day"
                set {p.%arg-1%::Chat1} to "mute %arg-1% 30m"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e30 Minutes"
                set {p.%arg-1%::Chat2} to "mute %arg-1% 1h"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e1 Hour"
                set {p.%arg-1%::Chat3} to "mute %arg-1% 2h"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e2 Hours"
                set {p.%arg-1%::Chat4} to "mute %arg-1% 1d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e1 Day"
                set {p.%arg-1%::Chat5} to "mute %arg-1% 30d"
                set {p.%arg-1%::ChatL5} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.Chat1} is 1:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 1h"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e1 Hour"
            if {p.%arg-1%::pOffences.Chat1} is 2:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 2h"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.Chat1} is 3:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 4h"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.Chat1} is 4:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 8h"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e8 Hours"
            if {p.%arg-1%::pOffences.Chat1} is 5:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 12h"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.Chat1} is 6:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 1d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.Chat1} is 7:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 2d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e2 Days"
            if {p.%arg-1%::pOffences.Chat1} is 8:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 4d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.Chat1} is 9:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 7d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.Chat1} is 10:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 14d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.Chat1} is 11:
                set {p.%arg-1%::Chat1} to "mute %arg-1% 30d"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.Chat1} is 12:
                set {p.%arg-1%::Chat1} to "mute %arg-1%"
                set {p.%arg-1%::ChatL1} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.Chat2} is 1:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 1h"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e1 Hours"
            if {p.%arg-1%::pOffences.Chat2} is 2:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 2h"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.Chat2} is 3:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 4h"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.Chat2} is 4:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 12h"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.Chat2} is 5:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 1d"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.Chat2} is 6:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 3d"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e3 Days"
            if {p.%arg-1%::pOffences.Chat2} is 7:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 7d"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.Chat2} is 8:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 14d"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.Chat2} is 9:
                set {p.%arg-1%::Chat2} to "mute %arg-1% 30d"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.Chat2} is 10:
                set {p.%arg-1%::Chat2} to "mute %arg-1%"
                set {p.%arg-1%::ChatL2} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.Chat3} is 1:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 2h"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.Chat3} is 2:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 4h"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.Chat3} is 3:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 12h"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.Chat3} is 4:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 1d"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.Chat3} is 5:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 4d"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.Chat3} is 6:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 7d"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.Chat3} is 7:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 14d"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.Chat3} is 8:
                set {p.%arg-1%::Chat3} to "mute %arg-1% 30d"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.Chat3} is 9:
                set {p.%arg-1%::Chat3} to "mute %arg-1%"
                set {p.%arg-1%::ChatL3} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.Chat4} is 1:
                set {p.%arg-1%::Chat4} to "mute %arg-1% 1d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.Chat4} is 2:
                set {p.%arg-1%::Chat4} to "mute %arg-1% 4d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.Chat4} is 3:
                set {p.%arg-1%::Chat4} to "mute %arg-1% 7d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.Chat4} is 4:
                set {p.%arg-1%::Chat4} to "mute %arg-1% 14d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.Chat4} is 5:
                set {p.%arg-1%::Chat4} to "mute %arg-1% 30d"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.Chat4} is 6:
                set {p.%arg-1%::Chat4} to "mute %arg-1%"
                set {p.%arg-1%::ChatL4} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.Chat5} is 1:
                set {p.%arg-1%::Chat5} to "mute %arg-1%"
                set {p.%arg-1%::ChatL5} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.General1} is 1:
                set {p.%arg-1%::General1} to "mute %arg-1% 1h"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e1 Hour"
            if {p.%arg-1%::pOffences.General1} is 2:
                set {p.%arg-1%::General1} to "mute %arg-1% 2h"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.General1} is 3:
                set {p.%arg-1%::General1} to "mute %arg-1% 4h"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.General1} is 4:
                set {p.%arg-1%::General1} to "mute %arg-1% 8h"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e8 Hours"
            if {p.%arg-1%::pOffences.General1} is 5:
                set {p.%arg-1%::General1} to "mute %arg-1% 12h"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.General1} is 6:
                set {p.%arg-1%::General1} to "mute %arg-1% 1d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.General1} is 7:
                set {p.%arg-1%::General1} to "mute %arg-1% 2d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e2 Days"
            if {p.%arg-1%::pOffences.General1} is 8:
                set {p.%arg-1%::General1} to "mute %arg-1% 4d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.General1} is 9:
                set {p.%arg-1%::General1} to "mute %arg-1% 7d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.General1} is 10:
                set {p.%arg-1%::General1} to "mute %arg-1% 14d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.General1} is 11:
                set {p.%arg-1%::General1} to "mute %arg-1% 30d"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.General1} is 12:
                set {p.%arg-1%::General1} to "mute %arg-1%"
                set {p.%arg-1%::GeneralL1} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.General2} is 1:
                set {p.%arg-1%::General2} to "mute %arg-1% 1h"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e1 Hours"
            if {p.%arg-1%::pOffences.General2} is 2:
                set {p.%arg-1%::General2} to "mute %arg-1% 2h"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.General2} is 3:
                set {p.%arg-1%::General2} to "mute %arg-1% 4h"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.General2} is 4:
                set {p.%arg-1%::General2} to "mute %arg-1% 12h"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.General2} is 5:
                set {p.%arg-1%::General2} to "mute %arg-1% 1d"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.General2} is 6:
                set {p.%arg-1%::General2} to "mute %arg-1% 3d"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e3 Days"
            if {p.%arg-1%::pOffences.General2} is 7:
                set {p.%arg-1%::General2} to "mute %arg-1% 7d"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.General2} is 8:
                set {p.%arg-1%::General2} to "mute %arg-1% 14d"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.General2} is 9:
                set {p.%arg-1%::General2} to "mute %arg-1% 30d"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.General2} is 10:
                set {p.%arg-1%::General2} to "mute %arg-1%"
                set {p.%arg-1%::GeneralL2} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.General3} is 1:
                set {p.%arg-1%::General3} to "mute %arg-1% 2h"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e2 Hours"
            if {p.%arg-1%::pOffences.General3} is 2:
                set {p.%arg-1%::General3} to "mute %arg-1% 4h"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e4 Hours"
            if {p.%arg-1%::pOffences.General3} is 3:
                set {p.%arg-1%::General3} to "mute %arg-1% 12h"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e12 Hours"
            if {p.%arg-1%::pOffences.General3} is 4:
                set {p.%arg-1%::General3} to "mute %arg-1% 1d"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.General3} is 5:
                set {p.%arg-1%::General3} to "mute %arg-1% 4d"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.General3} is 6:
                set {p.%arg-1%::General3} to "mute %arg-1% 7d"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.General3} is 7:
                set {p.%arg-1%::General3} to "mute %arg-1% 14d"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.General3} is 8:
                set {p.%arg-1%::General3} to "mute %arg-1% 30d"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.General3} is 9:
                set {p.%arg-1%::General3} to "mute %arg-1%"
                set {p.%arg-1%::GeneralL3} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.General4} is 1:
                set {p.%arg-1%::General4} to "mute %arg-1% 1d"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &e1 Day"
            if {p.%arg-1%::pOffences.General4} is 2:
                set {p.%arg-1%::General4} to "mute %arg-1% 4d"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &e4 Days"
            if {p.%arg-1%::pOffences.General4} is 3:
                set {p.%arg-1%::General4} to "mute %arg-1% 7d"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &e7 Days"
            if {p.%arg-1%::pOffences.General4} is 4:
                set {p.%arg-1%::General4} to "mute %arg-1% 14d"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &e14 Days"
            if {p.%arg-1%::pOffences.General4} is 5:
                set {p.%arg-1%::General4} to "mute %arg-1% 30d"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &e30 Days"
            if {p.%arg-1%::pOffences.General4} is 6:
                set {p.%arg-1%::General4} to "mute %arg-1%"
                set {p.%arg-1%::GeneralL4} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.General5} is 1:
                set {p.%arg-1%::General5} to "mute %arg-1%"
                set {p.%arg-1%::GeneralL5} to "&fMute Duration: &cPermanent"
            if {p.%arg-1%::pOffences.Chat1} is not set:
                set {p.%arg-1%::pOffences.Chat1} to 0
                set {p.%arg-1%::pOffences.Chat2} to 0
                set {p.%arg-1%::pOffences.Chat3} to 0
                set {p.%arg-1%::pOffences.Chat4} to 0
                set {p.%arg-1%::pOffences.Chat5} to 0
                set {p.%arg-1%::pOffences.General1} to 0
                set {p.%arg-1%::pOffences.General2} to 0
                set {p.%arg-1%::pOffences.General3} to 0
                set {p.%arg-1%::pOffences.General4} to 0
                set {p.%arg-1%::pOffences.General5} to 0
            if player has permission "punishment.trainee" or "punishment.mod": #Access to only Severity Level 1 and 2 punishments!
                delete {reversed.p.%arg-1%::history::*}
                set {_slot} to 0
                loop {p.%arg-1%::history::*}:
                    add 1 to {_slot}
                set {_reversedslot} to 1
                loop {p.%arg-1%::history::*}:
                    set {reversed.p.%arg-1%::history::%{_reversedslot}%} to "%{p.%arg-1%::history::%{_slot}%}%"
                    remove 1 from {_slot}
                    add 1 to {_reversedslot}
                open chest with 6 rows named "              &c&lPunishment" to player
                wait 3 tick
                format slot 4 of player with arg-1's skull named "&c&lPunish %arg-1%" with lore "&r%arg-2%||||&c&lGSMC Punishment" to be unstealable
                format slot 9 of player with book and quill named "&a&lServer Chat" with lore "&7Verbal Abuse, Spam, Harrassment, Trolling, etc" to be unstealable
                format slot 10 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat1}%||%{p.%arg-1%::ChatL1}%||||&7Spamming||&f        Spamming or flooding the chat.||||&7Insult Wording||&f   Using insult words like ez, L, noob||||&7Leaving Encouragement||&f   Encouraging players to leave the game or server.||||&7Chat Trolling||&f   Trolling a player with chat to confuse or mislead.||||&7Mini-Moderation||&f   Impersonating the Mod to enforce the rules.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to close then run [make player execute command "%{p.%arg-1%::Chat1}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat1}]
                format slot 11 of player with cactus green dye named "&a&lSeverity 2" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat2}%||%{p.%arg-1%::ChatL2}%||||&7Swearing/Vulgarism||&f   Swearing or using Vulgarism towards user.||||&7Rioting||&f   Issuing a User/Group riot towards user or server. (Instant Mute without Any Warning)||||&7Light Advertisement||&f   Advertising the server with mentioning the server name, without IP.||||&7Hackusating||&f   Accusing players of hacking in public chat.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to close then run [make player execute command "%{p.%arg-1%::Chat2}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f2||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat2}]

                format slot 27 of player with diamond sword named "&a&lServer Offense" with lore "&7Griefing, Hacking, Bug Abusing, etc." to be unstealable
                format slot 28 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General1}%||%{p.%arg-1%::GeneralL1}%||||&7Targeting||&f   Killing the specific player repeatedly in game. (Only Applicable on GTA Server)||||&7Violating Specific Map Rules||&f   Violating specific map rules that is on /rules command.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to clo se then run [make player execute command "%{p.%arg-1%::General1}% %arg-2%"]->[add "&ePunishment Type:&fServerOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General1}]
                format slot 29 of player with cactus green dye named "&a&lSeverity 2" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General2}%||%{p.%arg-1%::GeneralL2}%||||&7Teaming / Cross Teaming||&f   Teaming with other player(s)/team(s) in game. (Only Applicable on Minigames Server)||||&7Team Killing||&f   Killing the player who is on same team in game. (Only Applicable on Minigames Server)||||&7Spawn Killing||&f   Killing the players who is on the spawn zone. (Only Applicable on Minigames Server)||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to close then run [make player execute command "%{p.%arg-1%::General2}% %arg-2%"]->[add "&ePunishment Type: &fServerOffense||&eSeverity: &f2||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General2}]

                format slot 15 of player with paper named "&a&lWarning" with lore "||&7Example Warning Input;||&f   Spam - Repeatedly sending same/similar message to spam/flood the chat.||&f   Swearing - Using Swear/Vulgar words in chat||&f   Accusation - Accusing players of hacking publicly.||&f   Trolling - Making players confuse of mislead in chat." to close then run [make player execute command "warn %arg-1% %arg-2%"]->[add "&ePunishment Type: &fWarning||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]
                set {_slot} to 45
                loop {reversed.p.%arg-1%::history::*}:
                    set {punishgui.%player%::*} to "%arg 1%"
                    add "%arg 2%" to {punishgui.%player%::*}
                    if "%loop-value%" contains "&ePunishment Type: &fChatOffense":
                        set slot {_slot} of player's current inventory to book and quill named "&a&lChat Offense" with lore "%loop-value%"
                        add 1 to {_slot}
                    if "%loop-value%" contains "&ePunishment Type: &fServerOffense":
                        set slot {_slot} of player's current inventory to diamond sword named "&a&lServer Offense" with lore "%loop-value%"
                        add 1 to {_slot}
                    if "%loop-value%" contains "&ePunishment Type: &fWarning":
                        set slot {_slot} of player's current inventory to paper named "&a&lWarning" with lore "%loop-value%"
                        add 1 to {_slot}
                    if "%loop-value%" contains "&ePunishment Type: &rIP Ban":
                        set slot {_slot} of player's current inventory to enchanted book named "&a&lPermanent IP Ban" with lore "%loop-value%"
                        add 1 to {_slot}
                    if {_slot} = 54:
                        exit loop
            if player has permission "punishment.mod": #Access to all punishments!
                format slot 12 of player with dandelion yellow named "&a&lSeverity 3" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat3}%||%{p.%arg-1%::ChatL3}%||||&7Participating in Dispute||&f   Participating in other's Dispute in chat.||||&7Insulting the GunsterMC Community||&f   Insulting the GunsterMC Community in chat.||||&7Inappropriate Behavior||&f   Sexual joking or conversating with others.||||&7Discrimination/Racism/Political Conversation||&f   Discriminating/Being racism towards users, or talking about politic related topic.||||&2Instantly mute this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::Chat3}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f3||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat3}]
                format slot 13 of player with orange dye named "&a&lSeverity 4" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat4}%||%{p.%arg-1%::ChatL4}%||||&7Harassment/Bully||&f   Harassing or bullying others in chat.||||&7Insulting/Spreading groundless rumors about Staff Member||&f   Insulting or Spreading groundless rumors about staff members, including Moderators, YouTuber, Developments, etc.||||&7Solicit||&f   Making Solicit to others for ranks, items, etc.||||&2Instantly mute this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::Chat4}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f4||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat4}]
                format slot 14 of player with rose red named "&a&lSeverity 5" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat5}%||%{p.%arg-1%::ChatL5}%||||&7Issuing the Dispute||&f   Issuing the dispute towards user in chat.||||&7Medium Advertisement||&f   Advertising servers with insulting the server, or Advertising the server with IP.||||&7Revealing Personal Informations/Spreading false rumors||&f   Revealing personal informations including phone numbers, address, etc. or Spreading false rumors about player.||||&7Malicious Threats||&f   Threatening the users or server about killing them(or their family), or threatening users/server with hacking. ||||&2Instantly mute this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::Chat5}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f5||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat5}]

                format slot 30 of player with dandelion yellow named "&a&lSeverity 3" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General3}%||%{p.%arg-1%::GeneralL3}%||||&7Bug Exploiting||&f   Abusing the bug(s) to make unfair advantage to players.||||&7Unapproved Mods||&f   Using the mods that is on Unapproved.||&f   You can check the unapproved mods on http://bit.ly/gsmcrules.||||&2Instantly ban this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::General3}% %arg-2%"]->[add "&ePunishment Type: &fServerOffense||&eSeverity: &f3||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General3}]
                format slot 31 of player with orange dye named "&a&lSeverity 4" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General4}%||%{p.%arg-1%::GeneralL4}%||||&7Stealing/Grieifng||&f   Stealing or Griefing the structure that belongs to player who is on same Factions. (Only Applicable on Factions Server)||||&7Abusing Report System||&f   Abusing the Report System to interrupt the staff member's works.||||&2Instantly mute this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::General4}% %arg-2%"]->[add "&ePunishment Type: &fServerOffense||&eSeverity: &f4||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General4}]
                format slot 32 of player with rose red named "&a&lSeverity 5" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General5}%||%{p.%arg-1%::GeneralL5}%||||&7Hacking (Self-Report/Report)||&f   Using illegal hacks to make unfair advantage to other players.||||&7Smart Moving||&f   Using an Smart Moving mod to make unfair advantage to other players.||||&2Instantly mute this player when they broken the rules that is on this Severity Level." to close then run [make player execute command "%{p.%arg-1%::General5}% %arg-2%"]->[add "&ePunishment Type: &fServerOffense||&eSeverity: &f5||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat5}]

                format slot 24 of player with book and quill named "&a&lPermanent Mute" with lore "&fMute Duration: &cPermanent||||&7Sending Virus/Phishing Site/Inappropriate Link/Illegal Trade Site||&f   Sending Virush/Phishing/Inappropriate/Illegal Trade Site links to harm other users. ||||&7Severe Advertisement||&f   Advertising other servers with IP with spamming, or insulting GunsterMC.||||&7Account Scamming/Unapproved Transactions||&fTrying to scam other's Account or Opening Unapproved Transactions with others.||||&2Must supply detailed reason for Mute." to close then run [make player execute command "mute %arg-1% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f6||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]
                format slot 34 of player with redstone block named "&a&lPermanent Ban" with lore "&fBan Duration: &cPermanent||||&7Hacking||&f   Using illegal hacks to make unfair advantage to other players.||||&7Ban Evasion||&f   Evading an ban with Alternative Account(s)/VPN.||||&7Senior's Decision||||&7Inappropriate Name/Skin/Cape||&r Using inappropriate name/skin/cape in game.||||&2Must supply detailed reason for Ban." to close then run [make player execute command "ban %arg-1% %arg-2%"]->[add "&ePunishment Type: &fServerOffense||&eSeverity: &f6||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]
            if player has permission "[punishment.dev]": #Developer are allowed to view the Developer Warning
                format slot 0 of player with shiny dandelion named "&c&lDEV WARNING" with lore "&rDevelopers are advised against using the punish system||&runless permitted by Admin or higher Staff" to be unstealable
            if player have permission "[punishment.admin]": #Admin can IP/Network Ban a player.
                format slot 43 of player with enchanted book named "&a&lPermanent IP Ban" with lore "&fIP Ban Duration: &cPermanent||||&7Excessive Ban Evasion||&r   Evading an ban excessively with Alternative Accounts/VPNs.||||&cNetwork Ban Reasons||&r   DDoS/Doxing the GunsterMC Server||&r   Blacklisted User||&r   Forging the Evidence in Report||&r   Abusing Staff Permissions/Revealing Staff's Personal Informations||&r   Admin or Higher Staff's decision||||&c&lWARNING: &rAbusing with this punishment may result in a Demotion and Network Ban." to close then run [make player execute command "ban %arg-1% %arg-2%"]->[add "&ePunishment Type: &rIP Ban||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]

on inventory click:
    if inventory name of player's current inventory is "            Punish":
        cancel event
        clicked slot >= 45
        set {_clickedslot.%player%} to (clicked slot - 44)
        if {reversed.p.%{punishgui.%player%::1}%::history::%{_clickedslot.%player%}%} is set:
            if "%{reversed.p.%{punishgui.%player%::1}%::history::%{_clickedslot.%player%}%}%" contains "&eRemoved by: ":
                send "" to console
            else:
                set {_reasonchanger.%player%} to "%{reversed.p.%{punishgui.%player%::1}%::history::%{_clickedslot.%player%}%}% ||||&eRemoved by: &f%player%||&eRemove Reason: &f%{punishgui.%player%::2}%"
                set {reversed.p.%{punishgui.%player%::1}%::history::%{_clickedslot.%player%}%} to "%{_reasonchanger.%player%}%"
                close player's inventory
                delete {p.%{punishgui.%player%::1}%::history::*}
                set {_slot} to 0
                loop {reversed.p.%{punishgui.%player%::1}%::history::*}:
                    add 1 to {_slot}
                set {_reversedslot} to 1
                loop {reversed.p.%{punishgui.%player%::1}%::history::*}:
                    set {p.%{punishgui.%player%::1}%::history::%{_reversedslot}%} to "%{reversed.p.%{punishgui.%player%::1}%::history::%{_slot}%}%"
                    remove 1 from {_slot}
                    add 1 to {_reversedslot}
                if "%{_reasonchanger.%player%}%" contains "ChatOffense":
                    make player execute "unmute %{punishgui.%player%::1}%"
                if "%{_reasonchanger.%player%}%" contains "ServerOffense" or "IP Ban":
                    make player execute "unban %{punishgui.%player%::1}%"
                if "%{_reasonchanger.%player%}%" contains "Warning":
                    make player execute "unwarn %{punishgui.%player%::1}%"


Errors on Reload:

code_language.skript:
[add 1 to {p.%arg-1%::pOffences.Chat1}] is not a valid lambda statement. (gsmcpunish.sk, line 291: format slot 10 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat1}%||%{p.%arg-1%::ChatL1}%||||&7Spamming||&f        Spamming or flooding the chat.||||&7Insult Wording||&f   Using insult words like ez, L, noob||||&7Leaving Encouragement||&f   Encouraging players to leave the game or server.||||&7Chat Trolling||&f   Trolling a player with chat to confuse or mislead.||||&7Mini-Moderation||&f   Impersonating the Mod to enforce the rules.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to close then run [make player execute command "%{p.%arg-1%::Chat1}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat1}]')
[add 1 to {p.%arg-1%::pOffences.General1}] is not a valid lambda statement. (gsmcpunish.sk, line 295: format slot 28 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General1}%||%{p.%arg-1%::GeneralL1}%||||&7Targeting||&f   Killing the specific player repeatedly in game. (Only Applicable on GTA Server)||||&7Violating Specific Map Rules||&f   Violating specific map rules that is on /rules command.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to clo se then run [make player execute command "%{p.%arg-1%::General1}% %arg-2%"]->[add "&ePunishment Type:&fServerOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General1}]')

Console Errors: (if applicable)

code_language.skript:
[17:49:06] [Server thread/ERROR]: [add 1 to {p.%arg-1%::pOffences.Chat1}] is not a valid lambda statement. (gsmcpunish.sk, line 291: format slot 10 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.Chat1}%||%{p.%arg-1%::ChatL1}%||||&7Spamming||&f        Spamming or flooding the chat.||||&7Insult Wording||&f   Using insult words like ez, L, noob||||&7Leaving Encouragement||&f   Encouraging players to leave the game or server.||||&7Chat Trolling||&f   Trolling a player with chat to confuse or mislead.||||&7Mini-Moderation||&f   Impersonating the Mod to enforce the rules.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to close then run [make player execute command "%{p.%arg-1%::Chat1}% %arg-2%"]->[add "&ePunishment Type: &fChatOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.Chat1}]')
[17:49:06] [Server thread/ERROR]: [add 1 to {p.%arg-1%::pOffences.General1}] is not a valid lambda statement. (gsmcpunish.sk, line 295: format slot 28 of player with lime dye named "&a&lSeverity 1" with lore "&fPast Offences: &e%{p.%arg-1%::pOffences.General1}%||%{p.%arg-1%::GeneralL1}%||||&7Targeting||&f   Killing the specific player repeatedly in game. (Only Applicable on GTA Server)||||&7Violating Specific Map Rules||&f   Violating specific map rules that is on /rules command.||||&2Please be sure to give Warning first if 0 Past Offences and 0 Warnings." to clo se then run [make player execute command "%{p.%arg-1%::General1}% %arg-2%"]->[add "&ePunishment Type:&fServerOffense||&eSeverity: &f1||||&eReason: &f%arg-2%||||&eStaff: &f%player%||||&eDate: &f%now%" to {p.%arg-1%::history::*}]->[add 1 to {p.%arg-1%::pOffences.General1}]')

Other Useful Info:
I can't find problems in this error.

Addons using (including versions):
SkRayFall v1.9.5, SkQuery, WildSkript

Troubleshooting:

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? I was finding an problem of codes and I can't find the wrong expressions in this code.
 
I was trying to remake the boobah's discontinued Punishment GUI, But I can't fix this issues easliy.
The solution is not using skQuery's format slot, it's buggy and no one should be using it at this point. Boobah's Punishment GUI is just one of the worst famous scripts (followed by MPCore). It'd be better to just make your own using TuSKe's GUI Manager or set slot and inventory click.
 
If you want to sick with format slot, I always used console commands for those. Create some console only command that can be called with arguments necessary to update those two variables.
 
Status
Not open for further replies.