Not a type

  • 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.
Jan 22, 2018
25
0
0
Hello there i am working on a safe ban plugin to hopefully help with abuse but i am having issues with skript heres my code i added comments to it to show what each line does
code_language.skript:
command /ban [<offline player>] [<text>]:
    trigger:
        if arg-1 has permission Owner.Bypass:#Checks to see if player specified as arg-1 is Owner
            send "&cPunish> The player specified is a higher rank" #Returns an error because player specified is Owner therefore they own the server so the command returns an error
            stop #Prevents the ban from going through
        if player has permission Manager.Bypass and arg-1 has permission Co-Owner.Bypass: #Checks permission of player sending and arg-1
            send "&c&lPunish> The player specified is a higher rank" #Returns an error because the player specified is higher then the executor
            stop #Prevents the ban from going through
        if player has permission Co-Owner.Bypass or Owner.Bypass and arg-1 has permission Manager.Bypass: #Checks permissions
            make player execute command "/maxbans:ban %arg-1% %arg-2%" #Bans player specified if conditions are met
        if player has permission Admin.Bypass and arg-1 has permission Manager.Bypass:or Co-Owner.Bypass or Owner.Bypass: #Checks permissions
            send "&c&lPunish> The player specified is a higher rank" #Returns an error because the player specified is higher then the executor
            stop #Prevents the ban from going through
        if player has permission Co-Owner.Bypass or Manager.Bypass or Owner.Bypass and arg-1 has permission Admin.Bypass: #Checks permissions
            make player execute command "/maxbans:ban %arg-1% %arg-2%" #Bans player specified if conditions are met

Here is the error I get

code_language.skript:
[11:52:57 INFO]: [Skript] Reloading SafeBan.sk...
[11:52:57 ERROR]: 'permission Owner.Bypass' is not an item type (SafeBan.sk, line 3: if arg-1 has permission Owner.Bypass:')
[11:52:57 ERROR]: '1 has permission Co-Owner.Bypass' is not a type (SafeBan.sk, line 6: if player has permission Manager.Bypass and arg-1 has permission Co-Owner.Bypass:')
[11:52:57 ERROR]: '1 has permission Manager.Bypass' is not a type (SafeBan.sk, line 9: if player has permission Co-Owner.Bypass or Owner.Bypass and arg-1 has permission Manager.Bypass:')
[11:52:57 ERROR]: ':or Co-Owner.Bypass or Owner.Bypass' is not a valid item data (SafeBan.sk, line 11: if player has permission Admin.Bypass and arg-1 has permission Manager.Bypass:or Co-Owner.Bypass or Owner.Bypass:')
[11:52:57 ERROR]: '1 has permission Admin.Bypass' is not a type (SafeBan.sk, line 14: if player has permission Co-Owner.Bypass or Manager.Bypass or Owner.Bypass and arg-1 has permission Admin.Bypass:')
[11:52:57 INFO]: [Skript] Encountered 5 errors while reloading SafeBan.sk!

Any help would be greatly appreciated.
 
Like Die said... your permission has to be in quotes

you put
code_language.skript:
if arg-1 has permission Owner.Bypass:
You need to put
code_language.skript:
if arg-1 has permission "Owner.Bypass":
 
Status
Not open for further replies.