Solved Function error <none>

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

xXSwainXx

Active Member
Jan 27, 2017
55
5
8
26
Hey Guys have a Problem with my skript :emoji_stuck_out_tongue:

Here is the function code:

code_language.skript:
function getPlayerGroup(p: player) :: text:
    "%configuration section ""users"" get of ""plugins/PermissionsEx/permissions.yml""%" contain "-":
        set {_p} to uuid of {_p}
    set {_group::*} to value list "users.%{_p}%.group" get of "plugins/PermissionsEx/permissions.yml"
    return {_group::1}

Here the command:

code_language.skript:
command /info [<text>]:
    aliases: i
    trigger:
        if player does not have permission "{@Permission.Info}":
            message "{@Logo} {@NoPermission}"
        else:
            If arg-1 is not set:
                message "{@Logo} {@NoName}"
                message "{@Logo} &a/info &c<Spieler>"
            else:
                set {_getIP} to WasPlayerAlreadyOnline("%arg-1%")
                If {_getIP} is "false":
                    message "{@Logo} {@PlayerNotFound}"
                else:
                    set {_BannedMoreInfo} to ""
                    set {_MutedMoreInfo} to ""
                    set {_id} to "{@UUID-Support}"
                    If {_id} is "true":
                        set {_uuid} to getUUID("%arg-1%")
                        set {_Banned?} to getBannedPlayer("%{_uuid}%", "Player")
                    else:
                        set {_Banned?} to getBannedPlayer("%arg-1%", "Player")
                    If {_Banned?} is "true":
                        set {_Banned?} to "&aJa"
                    else:
                        set {_Banned?} to "&cNein"
                    If {_id} is "true":
                        set {_Muted?} to getMutedPlayer("%{_uuid}%", "Player")
                    else:
                        set {_Muted?} to getMutedPlayer("%arg-1%", "Player")
                    If {_Muted?} is "true":
                        set {_Muted?} to "&aJa"
                    else:
                        set {_Muted?} to "&cNein"
                    If {_id} is "true":
                        set {_SetResult::*} to objects in column "Log" from result of query "SELECT * FROM History WHERE Player = '%{_uuid}%'"
                    else:
                        set {_SetResult::*} to objects in column "Log" from result of query "SELECT * FROM History WHERE Player = '%arg-1%'"
                    set {_getResult} to false
                    loop {_SetResult::*}:
                        set {_getResult} to true
                    set {info.head.%arg-1%} to skull of "%arg-1%" parsed as offline player
                    set {banstat.head} to skull of "Globe" parsed as offline player
                    set {_player} to "%arg 1%" parsed as offlineplayer
                    set {_rank} to getPlayerGroup({_player})
                    open hopper named "&9&l%arg-1%" to player
                    format slot 0 of player with {info.head.%arg-1%} named "&7InGame Name&8: &3%arg-1%" with lore "&a||&7Rang&8: &e%{_rank}%||&7Status: %{on.%arg-1%}%" to be unstealable
                    format slot 4 of player with {banstat.head} named "&7Punkte" with lore "&a||&7Bannpunkte&8: &3%{banpunkte.%arg-1%}%||&7Mutepunkte&8: &3%{mutepunkte.%arg-1%}%" to be unstealable
                    format slot 3 of player with paper named "&7Status" with lore "&a||&7Ist Gebannt&8: %{_Banned?}%||&7Ist Gemuted&8: %{_Muted?}%" to be unstealable


The error comes when a player is offline came an error

Rang: <none>

This comes when player is offline:

Screenshot_22.png



and online player:

Screenshot_21.png



PLS HELP!
 
Change player to offline player :

code_language.skript:
function getPlayerGroup(p: offlineplayer) :: text:
    "%configuration section ""users"" get of ""plugins/PermissionsEx/permissions.yml""%" contain "-":
        set {_p} to uuid of {_p}
    set {_group::*} to value list "users.%{_p}%.group" get of "plugins/PermissionsEx/permissions.yml"
    return {_group::1}
 
Change player to offline player :

code_language.skript:
function getPlayerGroup(p: offlineplayer) :: text:
    "%configuration section ""users"" get of ""plugins/PermissionsEx/permissions.yml""%" contain "-":
        set {_p} to uuid of {_p}
    set {_group::*} to value list "users.%{_p}%.group" get of "plugins/PermissionsEx/permissions.yml"
    return {_group::1}

It's working thx