[Error] Can't be added to an inventory

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

sOxTw

Member
Jan 27, 2017
35
2
8
30
Hello, as I think you have already noticed, I need to randomly add items between two values, the problem is the error I get.

Skript:
code_language.skript:
options:
    # Diamond
    SinEncantar-Diamante: 1
    FortunaI-Diamante: 1 and 2
    FortunaII-Diamante: none
    FortunaIII-Diamante: none
    
# Event
on mine:
    if tool of player is enchanted with fortune 1:
        set {_cant} to random integer between {@FortunaI-Diamante}
        send "%{_cant}%" # work
        add {_cant} stone to player's inventory

Error:
code_language.skript:
[20:36:42 ERROR]: '{_cant} stone' can't be added to an inventory because the for
mer is neither an item type nor an inventory (EasiMine.sk, line 14: add {_cant}
stone to player's inventory')

Does anyone know why or how to fix it?
 
code_language.skript:
add {_cant} of stone to player's inventory
Just add of before item and after amount .
 
Status
Not open for further replies.