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.

I am trying to use a variable as a number and is not working for some effects

Discussion in 'Skript' started by Mich, Aug 29, 2020.

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

    Mich Active Member

    Joined:
    Jul 15, 2020
    Messages:
    136
    Likes Received:
    5
    Skript Version (do not put latest): Skript 2.5-beta3
    Skript Author: ShaneBee
    Minecraft Version: spigot 1.12.2
    ---
    Full Code:
    REED THIS PLEASE:
    I am not triying to use a command on my code this is just an example of my problem. I you need the full code let me know
    Code (Skript):
    Code (Text):
    1. command /test:
    2.     trigger:
    3.         set {_2} to 1
    4.         give ({_2} parsed as number) golden apple to the player
    Errors on Reload:
    ({_2} parsed as number) golden apple' can't be added to a player because the former is neither an item type, an inventory nor an experience point (pvp.sk, line 32: give ({_2} parsed as number) golden apple to the player')
    also for example this is not working too
    code
    Code (Text):
    1. command /test1:
    2.     trigger:
    3.         set {_2} to 1
    4.         set {_item} to golden apple
    5.         give ({_2} parsed as number) ({_item} parsed as item) to the player
    error
    '({_2} parsed as number) ({_item} parsed as item)' can't be added to a player because the former is neither an item type, an inventory nor an experience point (pvp.sk, line 176: give ({_2} parsed as number) ({_item} parsed as item) to the player')
     
    #1 Mich, Aug 29, 2020
    Last edited: Aug 30, 2020
  2. Chriz

    Chriz Member

    Joined:
    Aug 30, 2020
    Messages:
    14
    Likes Received:
    1
    Try this:
    Code (Text):
    1. command /test1:
    2.     trigger:
    3.         set {_2} to 1
    4.         set {item} to golden apple
    5.         give player {_2} of {item}
     
Thread Status:
Not open for further replies.

Share This Page

Loading...