Skript outputting <none> instead of a player name

  • 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 community!

    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.

T-dash

Member
Apr 20, 2020
3
0
0
I am working on a ban gui and I have two commands /p (player name) and /ti (player name) (Ban time) (reason) when you do /p(player name) and click the reason instead of putting the inputted player name it puts <none>. Any ideas on how to fix this.

Main gui (/p Player name)
Code:
command /p <player>:
    trigger:
        open virtual chest inventory with size 6 named "Ban" to player
        format gui slot 20 of player with Book named "&bPing Spoof" to run:
            execute player command "/ti %arg 1% Ping Spoof"
        format gui slot 21 of player with Book named "&bKill Aura" to run:
            execute player command "/ti %arg 1% Kill Aura"
        format gui slot 22 of player with Book named "&bJesus Hacks" to run:
            execute player command "/ti %arg 1% Jesus"
        format gui slot 23 of player with Book named "&bAnti Afk" to run:
            execute player command "/ti %arg 1% Anti Afk"
        format gui slot 24 of player with Book named "&bXray" to run:
            execute player command "/ti %arg 1% Xray"
        format gui slot 29 of player with Book named "&bSpeed Hacks" to run:
            execute player command "/ti %arg 1% Speed Hacks"
        format gui slot 30 of player with Book named "&bChest Esp" to run:
            execute player command "/ti %arg 1% Chest Esp"
        format gui slot 31 of player with Book named "&bSpamming" to run:
            execute player command "/ti %arg 1% Spamming"
        format gui slot 32 of player with Book named "&bFly Hacks" to run:
            execute player command "/ti %arg 1% Fly Hacks"
        format gui slot 33 of player with Book named "&bGriefing" to run:
            execute player command "/ti %arg 1% Griefing"


Time of ban code (/ti (player name) (Ban time) (reason))
Code:
command /ti <player> <text>:
    trigger:
        open virtual chest inventory with size 3 named "Ban Time" to player
        format gui slot 11 of player with clock named "&b1 Week" to run:
            execute player command "/tempban %arg 1% 1w You Have Been Banned By %player% For %arg 2%"
        format gui slot 12 of player with clock named "&b2 weeks" to run:
            execute player command "/tempban %arg 1% 2w You Have Been Banned By %player% For %arg 2%"
        format gui slot 13 of player with clock named "&b3 Weeks" to run:
            execute player command "/tempban %arg 1% 3w You Have Been Banned By %player% For %arg 2%"
        format gui slot 14 of player with clock named "&b4 Weeks" to run:
            execute player command "/tempban %arg 1% 4w You Have Been Banned By %player% For %arg 2%"
        format gui slot 15 of player with clock named "&b5 Weeks" to run:
            execute player command "/tempban %arg 1% 5w You Have Been Banned By %player% For %arg 2%"
 
I am working on a ban gui and I have two commands /p (player name) and /ti (player name) (Ban time) (reason) when you do /p(player name) and click the reason instead of putting the inputted player name it puts <none>. Any ideas on how to fix this.

Main gui (/p Player name)
Code:
command /p <player>:
    trigger:
        open virtual chest inventory with size 6 named "Ban" to player
        format gui slot 20 of player with Book named "&bPing Spoof" to run:
            execute player command "/ti %arg 1% Ping Spoof"
        format gui slot 21 of player with Book named "&bKill Aura" to run:
            execute player command "/ti %arg 1% Kill Aura"
        format gui slot 22 of player with Book named "&bJesus Hacks" to run:
            execute player command "/ti %arg 1% Jesus"
        format gui slot 23 of player with Book named "&bAnti Afk" to run:
            execute player command "/ti %arg 1% Anti Afk"
        format gui slot 24 of player with Book named "&bXray" to run:
            execute player command "/ti %arg 1% Xray"
        format gui slot 29 of player with Book named "&bSpeed Hacks" to run:
            execute player command "/ti %arg 1% Speed Hacks"
        format gui slot 30 of player with Book named "&bChest Esp" to run:
            execute player command "/ti %arg 1% Chest Esp"
        format gui slot 31 of player with Book named "&bSpamming" to run:
            execute player command "/ti %arg 1% Spamming"
        format gui slot 32 of player with Book named "&bFly Hacks" to run:
            execute player command "/ti %arg 1% Fly Hacks"
        format gui slot 33 of player with Book named "&bGriefing" to run:
            execute player command "/ti %arg 1% Griefing"


Time of ban code (/ti (player name) (Ban time) (reason))
Code:
command /ti <player> <text>:
    trigger:
        open virtual chest inventory with size 3 named "Ban Time" to player
        format gui slot 11 of player with clock named "&b1 Week" to run:
            execute player command "/tempban %arg 1% 1w You Have Been Banned By %player% For %arg 2%"
        format gui slot 12 of player with clock named "&b2 weeks" to run:
            execute player command "/tempban %arg 1% 2w You Have Been Banned By %player% For %arg 2%"
        format gui slot 13 of player with clock named "&b3 Weeks" to run:
            execute player command "/tempban %arg 1% 3w You Have Been Banned By %player% For %arg 2%"
        format gui slot 14 of player with clock named "&b4 Weeks" to run:
            execute player command "/tempban %arg 1% 4w You Have Been Banned By %player% For %arg 2%"
        format gui slot 15 of player with clock named "&b5 Weeks" to run:
            execute player command "/tempban %arg 1% 5w You Have Been Banned By %player% For %arg 2%"

TuSKe GUIs are so buggy when you use "to run:" you can't use values of a loop or arguemnts or variables

Try to use "to run function ban(player, arg-1,"Reason")"

Make sure to create the function it is not integrated!
 
How would I make a it so that when you click the reason it opens a another GUI so you could pick the time of the ban.
 
this is what have:
"format gui slot 20 of player with Book named "&bPing Spoof" to run function ti arg-1 Ping Spoof" is that wright?
 
I am working on a ban gui and I have two commands /p (player name) and /ti (player name) (Ban time) (reason) when you do /p(player name) and click the reason instead of putting the inputted player name it puts <none>. Any ideas on how to fix this.

Main gui (/p Player name)
Code:
command /p <player>:
    trigger:
        open virtual chest inventory with size 6 named "Ban" to player
        format gui slot 20 of player with Book named "&bPing Spoof" to run:
            execute player command "/ti %arg 1% Ping Spoof"
        format gui slot 21 of player with Book named "&bKill Aura" to run:
            execute player command "/ti %arg 1% Kill Aura"
        format gui slot 22 of player with Book named "&bJesus Hacks" to run:
            execute player command "/ti %arg 1% Jesus"
        format gui slot 23 of player with Book named "&bAnti Afk" to run:
            execute player command "/ti %arg 1% Anti Afk"
        format gui slot 24 of player with Book named "&bXray" to run:
            execute player command "/ti %arg 1% Xray"
        format gui slot 29 of player with Book named "&bSpeed Hacks" to run:
            execute player command "/ti %arg 1% Speed Hacks"
        format gui slot 30 of player with Book named "&bChest Esp" to run:
            execute player command "/ti %arg 1% Chest Esp"
        format gui slot 31 of player with Book named "&bSpamming" to run:
            execute player command "/ti %arg 1% Spamming"
        format gui slot 32 of player with Book named "&bFly Hacks" to run:
            execute player command "/ti %arg 1% Fly Hacks"
        format gui slot 33 of player with Book named "&bGriefing" to run:
            execute player command "/ti %arg 1% Griefing"


Time of ban code (/ti (player name) (Ban time) (reason))
Code:
command /ti <player> <text>:
    trigger:
        open virtual chest inventory with size 3 named "Ban Time" to player
        format gui slot 11 of player with clock named "&b1 Week" to run:
            execute player command "/tempban %arg 1% 1w You Have Been Banned By %player% For %arg 2%"
        format gui slot 12 of player with clock named "&b2 weeks" to run:
            execute player command "/tempban %arg 1% 2w You Have Been Banned By %player% For %arg 2%"
        format gui slot 13 of player with clock named "&b3 Weeks" to run:
            execute player command "/tempban %arg 1% 3w You Have Been Banned By %player% For %arg 2%"
        format gui slot 14 of player with clock named "&b4 Weeks" to run:
            execute player command "/tempban %arg 1% 4w You Have Been Banned By %player% For %arg 2%"
        format gui slot 15 of player with clock named "&b5 Weeks" to run:
            execute player command "/tempban %arg 1% 5w You Have Been Banned By %player% For %arg 2%"
Don't use <player> cuz it only works for only players, use <offline player> and its better.
Here's the code:

Code:
command /p [<offline player>]:
    permission message: &cYou don't have permssion.
    permission: *.*
    execute by: players
    trigger:
        if arg-1 is set:
            open virtual chest inventory with size 6 named "Ban" to player
            format gui slot 20 of player with Book named "&bPing Spoof" to run:
                execute player command "ti %arg1% Ping Spoof"

            format gui slot 21 of player with Book named "&bKill Aura" to run:
                execute player command "ti %arg 1% Kill Aura"

            format gui slot 22 of player with Book named "&bJesus Hacks" to run:
                execute player command "ti %arg 1% Jesus"

            format gui slot 23 of player with Book named "&bAnti Afk" to run:
                execute player command "ti %arg 1% Anti Afk"

            format gui slot 24 of player with Book named "&bXray" to run:
                execute player command "ti %arg 1% Xray"

            format gui slot 29 of player with Book named "&bSpeed Hacks" to run:
                execute player command "ti %arg 1% Speed Hacks"

            format gui slot 30 of player with Book named "&bChest Esp" to run:
                execute player command "ti %arg 1% Chest Esp"

            format gui slot 31 of player with Book named "&bSpamming" to run:
                execute player command "ti %arg 1% Spamming"

            format gui slot 32 of player with Book named "&bFly Hacks" to run:
                execute player command "ti %arg 1% Fly Hacks"

            format gui slot 33 of player with Book named "&bGriefing" to run:
                execute player command "ti %arg 1% Griefing"
        else:
            send "&cUsage: /p <player>"

command /ti [<offline player>] [<text>]:
    permission message: &cYou don't have permssion.
    permission: *.*
    execute by: players
    trigger:
        if arg-1 is set:
            if arg-2 is set:
                open virtual chest inventory with size 3 named "Ban Time" to player
                format gui slot 11 of player with clock named "&b1 Week" to run:
                    execute player command "tempban %arg 1% 1w You Have Been Banned By %player% For %arg 2%"

                format gui slot 12 of player with clock named "&b2 weeks" to run:
                    execute player command "tempban %arg 1% 2w You Have Been Banned By %player% For %arg 2%"

                format gui slot 13 of player with clock named "&b3 Weeks" to run:
                    execute player command "tempban %arg 1% 3w You Have Been Banned By %player% For %arg 2%"

                format gui slot 14 of player with clock named "&b4 Weeks" to run:
                    execute player command "tempban %arg 1% 4w You Have Been Banned By %player% For %arg 2%"

                format gui slot 15 of player with clock named "&b5 Weeks" to run:
                    execute player command "tempban %arg 1% 5w You Have Been Banned By %player% For %arg 2%"
            else:
                send "&cUsage: /ti <player> <reason>"
        else:
            send "&cUsage: /ti <player> <reason>"
 
Status
Not open for further replies.