Solved Functions dont work?!

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

Bastiaan1200

Member
May 22, 2017
4
0
1
Hello,

When I make use an function they just don't work. (See spoiler)
Am I doing something wrong?

I got skQuery, skRayfall, skungee and Skellett.

function vanishEnable(p: player):
function vanishDisable(p: player):

[17:02:46 ERROR]: [Skript] 'vanishEnable(player)' is not a boolean (yes/no) (BungeeGlobal.sk, line 116: vanishEnable(player)')
[17:02:46 ERROR]: [Skript] 'vanishEnable(player)' is not a boolean (yes/no) (BungeeGlobal.sk, line 120: vanishEnable(player)')
[17:02:46 ERROR]: [Skript] 'vanishDisable(player)' is not a boolean (yes/no) (BungeeGlobal.sk, line 124: vanishDisable(player)')
[17:02:46 ERROR]: [Skript] 'vanishEnable(p: player)' is not a text (BungeeGlobal.sk, line 128: function vanishEnable(p: player):')
[17:02:46 ERROR]: [Skript] 'vanishDisable(p: player)' is not a text (BungeeGlobal.sk, line 134: function vanishDisable(p: player):')

Can anyone help?

Thanks,
Kiip
 
code_language.skript:
command /v [<text>]:
    permission: KiipCore.Vanish
    permission message: &9[&bKiip&dNetwork&9] &cYou do not have permission's for this command!
    trigger:
        if arg-1 is set:
            make player execute command "vanish %arg-1%"
            stop
        make player execute command "vanish"
command /vanish [<text>]:
    permission: KiipCore.Vanish
    permission message: &9[&bKiip&dNetwork&9] &cYou do not have permission's for this command!
    trigger:
        if arg-1 is not set:
            if {Vanish.%uuid of player%} is not set:
                vanishEnable(player)
                message "{@p}Vanish enabled!"
                stop
            if {Vanish.%uuid of player%} is false:
                vanishEnable(player)
                message "{@p}Vanish enabled!"
                stop
            if {Vanish.%uuid of player%} is true:
                vanishDisable(player)
                message "{@p}Vanish disabled!"
                stop
            stop
function vanishEnable(p: player):
    set {_uuid} to uuid of {_p}
    set {Vanish.%{_uuid}%} to true
    set global {Vanish.%{_uuid}%} to true
    send actionbar "{@p}You are hidden from all players!" to bungee {_p}
    hide {_p} from all players
function vanishDisable(p: player):
    set {_uuid} to uuid of {_p}
    set {Vanish.%{_uuid}%} to false
    set global {Vanish.%{_uuid}%} to false
    reveal {_p} from all players
 
code_language.skript:
command /v [<text>]:
    permission: KiipCore.Vanish
    permission message: &9[&bKiip&dNetwork&9] &cYou do not have permission's for this command!
    trigger:
        if arg-1 is set:
            make player execute command "vanish %arg-1%"
            stop
        make player execute command "vanish"
command /vanish [<text>]:
    permission: KiipCore.Vanish
    permission message: &9[&bKiip&dNetwork&9] &cYou do not have permission's for this command!
    trigger:
        if arg-1 is not set:
            if {Vanish.%uuid of player%} is not set:
                vanishEnable(player)
                message "{@p}Vanish enabled!"
                stop
            if {Vanish.%uuid of player%} is false:
                vanishEnable(player)
                message "{@p}Vanish enabled!"
                stop
            if {Vanish.%uuid of player%} is true:
                vanishDisable(player)
                message "{@p}Vanish disabled!"
                stop
            stop
function vanishEnable(p: player):
    set {_uuid} to uuid of {_p}
    set {Vanish.%{_uuid}%} to true
    set global {Vanish.%{_uuid}%} to true
    send actionbar "{@p}You are hidden from all players!" to bungee {_p}
    hide {_p} from all players
function vanishDisable(p: player):
    set {_uuid} to uuid of {_p}
    set {Vanish.%{_uuid}%} to false
    set global {Vanish.%{_uuid}%} to false
    reveal {_p} from all players
Update your Skript :emoji_stuck_out_tongue:
 
Status
Not open for further replies.