1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Functions not working

Discussion in 'Skript' started by Davi3684, Jan 1, 2018.

Thread Status:
Not open for further replies.
  1. Davi3684

    Davi3684 Member

    Joined:
    Dec 29, 2017
    Messages:
    15
    Likes Received:
    0
    Minecraft Version:1.8
    ---
    Full Code:
    Code (Skript):
    1.  
    2. function myFunction(p: player):
    3.     set helmet of {_p} to leather helmet
    4.  
    Errors on Reload: myFunction(p: player) is not a text

    So I got another error that I just can't find a solution to. I've tried to make the p in player capitalized but that doesn't seem to help.

    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes
     
  2. Wynnevir

    Wynnevir Well-Known Member

    Joined:
    Jul 9, 2017
    Messages:
    1,016
    Likes Received:
    62
    Odd, I pasted your example into my test.sk and it loads just fine. Further still I set up a test command that calls it and that is fine as well.
    Code (Skript):
    1. function myFunction(p: player):
    2.     set helmet of {_p} to leather helmet
    3.    
    4.    
    5. command /test:
    6.     trigger:
    7.         myFunction(player)
    Double check your indentations and spacing perhaps?
     
  3. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
    skript version? bensku's dev25 is the latest for 1.8
     
    • Like Like x 1
  4. Davi3684

    Davi3684 Member

    Joined:
    Dec 29, 2017
    Messages:
    15
    Likes Received:
    0
    in the config, it says version 2.1.2 idk if that can help.
     
  5. Donut

    Donut Well-Known Member

    Joined:
    Mar 27, 2017
    Messages:
    1,340
    Likes Received:
    176
    Medals:
Thread Status:
Not open for further replies.

Share This Page

Loading...