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.

Skript won't let me use a player %arg 1% in my script.

Discussion in 'Skript' started by EchoNoahGamingYT, May 31, 2019.

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

    Joined:
    May 4, 2019
    Messages:
    1
    Likes Received:
    0
    Hey, so i'm new-ish to Skript and stuff, and i've tried a few different ways to fix this, but I can't. How do I fix it?

    Script/code:
    command /boost <player>:
    description: Boosts the chosen player by healing them, and a few other things.
    permission: echoe.boost
    permission message: &cYou need echoe.boost to do that.
    trigger:
    feed %arg 1% by 5 beefs

    Errors on reload:
    Can't understand this condition/effect: feed %arg 1% by 5 beefs (echoessentials.sk, line 18: feed %arg 1% by 5 beefs')

    No addons.

    Troubleshooting:

    Have you tried searching the docs? Yes, I got it from the docs but edited it.
    Have you tried searching the forums? Yes
    What other methods have you tried to fix it? Tried changing it from feed the %arg 1% by 5 beefs to feed %arg 1% by 5 beefs, but it gives the same error with the "the".

    If you need anything else, tell me in the comments.
     
  2. CormanYT

    CormanYT Active Member

    Joined:
    Jan 6, 2018
    Messages:
    122
    Likes Received:
    4
    1. You don't need to use percents in that statement, percentages only go around strings (text) and variable names. So, %arg 1% becomes arg 1
    2. You don't need the extra number in arg 1, since you only have one argument. So use just "arg".
    3. I think an easier method would just be increasing the argument's hunger bar. Try:
    Code (Text):
    1. increase arg's hunger bar by (8 * 5)
    2. #8 is the amount of hunger a steak gives, and multiplied by 5
    If this helped give this a best answer
     
    #2 CormanYT, Jun 1, 2019
    Last edited: Jun 1, 2019
  3. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Dont use the percent sign if you dont putted the quotes before.
    for example... in your code you putted:
    Code (Skript):
    1. feed %arg 1% by 5 beefs
    but you dont put ' "" ' before. So put:
    Code (Skript):
    1. set arg 1's food level to 20
    I don't tested it, so idk if this work.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...