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

  • 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.

Mich

Active Member
Jul 15, 2020
148
6
18
23
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:
command /test:
    trigger:
        set {_2} to 1
        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:
command /test1:
    trigger:
        set {_2} to 1
        set {_item} to golden apple
        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')
 
Last edited:
Try this:
Code:
command /test1:
    trigger:
        set {_2} to 1
        set {item} to golden apple
        give player {_2} of {item}
 
Status
Not open for further replies.