Solved functions dosen't 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.

Richard_Trol

Member
Mar 12, 2020
11
1
3
23
Germany
Hi,
I started with Skript weeks ago and wanted to learn how to script with function. I watched many tutorials and when I tried it myselv, it dosent worked and said: LeatherSet(p: player) is not a text! I tried it with this code:

Code:
function LeatherSet(p: player):
    set helmet of {_p} to leather helmet
    set chestplate of {_p} to leather chestplate
    set leggings of {_p} to leather leggings
    set boots of {_p} to leather boots

command /lset:
    permission: syste.lset
    trigger:
        LeatherSet(player)

I use Skript 2.2
and have this addons:
MundoSK, skUtilities, SkQuery, ExtrasSK, SkAction, SkMorkaz, LargeSk, skRayFall, WildSkript, Umbaska, TuSKe, RandomSK
I also have PermissionsEx, WorldEdit, WorldGuard and ViaVersion if this could help...
 

Attachments

  • MyScript.sk
    264 bytes · Views: 212
whats ur mc version?
I use 1.8.8

I can try it and send you the error tomorrow.
[doublepost=1584107861,1584042085][/doublepost]
Code:
[Skript] Reloading ft.sk...
´LeatherSet(p: player)´ is not a text (ft.sk, line 1: function LeatherSet(p: player):´)
`LeatherSet8player) is not a boolean (yes/no) (ft.sk, line 10: LeatherSet(player)`)
[Skript] Encountered 2 errors wuile reloading ft.sk!
Error Message ^
 
I use 1.8.8

I can try it and send you the error tomorrow.
[doublepost=1584107861,1584042085][/doublepost]
Code:
[Skript] Reloading ft.sk...
´LeatherSet(p: player)´ is not a text (ft.sk, line 1: function LeatherSet(p: player):´)
`LeatherSet8player) is not a boolean (yes/no) (ft.sk, line 10: LeatherSet(player)`)
[Skript] Encountered 2 errors wuile reloading ft.sk!
Error Message ^



Code:
function leatherSet(p: player):
    set helmet of {_p} to leather helmet
    set chestplate of {_p} to leather chestplate
    set leggings of {_p} to leather leggings
    set boots of {_p} to leather boots

command /lset:
    permission: *
    trigger:
        leatherSet(player)

Try
 
Status
Not open for further replies.