#Variable displays as none

1 messages · Page 1 of 1 (latest)

mystic plaza
#
    send "&3Shop &8> &7Setting Item Costs..." to {_p}
    set {Priceof::seed} to 0.25
    set {Priceof::cactus} to 3.50
    set {Priceof::sugar cane} to 6.25
    set {Priceof::wheat} to 8.25    
    set {Priceof::melon slice} to 7.15    
    set {Priceof::carrot} to 8.00    
    set {Priceof::potato} to 3.12
    set {Priceof::pumpkin} to 50
    send "&3Shop &8> &7Done." to {_p}``` 

I use this to set the sell prices of each item


```function itemSell(player: player, type: text, slot: int, amount: int, item: item, price: num):

    if {Priceof::%{_item}%} is set:
        set slot {_slot} of metadata tag "%{_type}%" of {_player} to {_amount} of {_item} with nbt compound from "{Price:%{_price}%}" named "&e&l%{_item}% &7x%{_amount}%" with lore "" and "&eBuy Price: &a$%({_price}*({taxrate}+1))%" and "" and "&7Price Before Taxes: &f$%{_price}%" and "" and "&7Sell Price: &c$%{Priceof::%{_item}%}%/ea"
    else:
        set slot {_slot} of metadata tag "%{_type}%" of {_player} to {_amount} of {_item} with nbt compound from "{Price:%{_price}%}" named "&e&l%{_item}% &7x%{_amount}%" with lore "" and "&eBuy Price: &a$%({_price}*({taxrate}+1))%" and "" and "&7Price Before Taxes: &f$%{_price}%" and "" and "&7Sell Price: &cCannot be sold"``` 

This is the function I used for the shop, the shop works, everything displays fine except for the sell price. Every item shows "Cannot be sold"
frozen raven
#

have you broadcasted {_item}?

#

try {PriceOf::%type of {_item}%}

mystic plaza
#

Yeah, I did try that, comes out as <none>