#Bug with redstone lamp and daylight detector for shop gui

1 messages · Page 1 of 1 (latest)

cursive comet
#
        if {n.%{_p}%} is not set:
                set {_n.%{_p}%} to 1
        else:
                set {_n.%{_p}%} to {n.%{_p}%}
        set {_i.%{_p}%} to {_item} parsed as item
        set {_buy.%{_p}%} to a new chest inventory with 6 row with name "&aAcheter %{_item}%"
        set slot (numbers from 0 to 53) of {_buy.%{_p}%} to yellow stained glass pane named " " 
        set slot 22 of {_buy.%{_p}%} to {_n.%{_p}%} of {_i.%{_p}%} with lore "&7Prix d'achat: &c$%{_n.%{_p}%}*{_price}%"
        if {_n.%{_p}%} is higher than 1:
                set slot 18 of {_buy.%{_p}%} to red stained glass pane named "&c&lMettre à 1"
                set slot 20 of {_buy.%{_p}%} to red stained glass pane named "&c&lEnlever 1"
        if {_n.%{_p}%} is higher than 10:
                set slot 19 of {_buy.%{_p}%} to 10 of red stained glass pane named "&c&lEnlever 10"
        if {_n.%{_p}%} is lower than 64:
                set slot 24 of {_buy.%{_p}%} to green stained glass pane named "&a&lAjouter 1"
                set slot 26 of {_buy.%{_p}%} to 64 of green stained glass pane named "&a&lMettre à 64"
        if {_n.%{_p}%} is lower than 35:
                set slot 25 of {_buy.%{_p}%} to 10 of green stained glass pane named "&a&lAjouter 10"
        set slot 39 of {_buy.%{_p}%} to green stained glass named "&a&lConfirmer"
        set slot 41 of {_buy.%{_p}%} to red stained glass named "&c&lAnnuler"
        set {n.%{_p}%} to {_n.%{_p}%}
        set {item.%{_p}%} to {_item}
        set {price.%{_p}%} to {_price}
        open {_buy.%{_p}%} to {_p}```     When I use "Daylight Detector" and "Redstone Lamp" as item. It's not work. All other item works... I don't understand why. Have u Ideas?
austere vale
#

Debug ? Maybe it doesnt parse string to item correctly when you use those

#

Or another issue

#

But debug pls

cursive comet
#
        if {n.%{_p}%} is not set:
                set {_n.%{_p}%} to 1
        else:
                set {_n.%{_p}%} to {n.%{_p}%}
        set {_i.%{_p}%} to {_item} parsed as item
        set {_buy.%{_p}%} to a new chest inventory with 6 row with name "&aAcheter %{_item}%"
        set slot (numbers from 0 to 53) of {_buy.%{_p}%} to yellow stained glass pane named " " 
        set slot 22 of {_buy.%{_p}%} to {_n.%{_p}%} of {_i.%{_p}%} with lore "&7Prix d'achat: &c$%{_n.%{_p}%}*{_price}%"
        broadcast "%{_i.%{_p}%}%"
        if {_n.%{_p}%} is higher than 1:
                set slot 18 of {_buy.%{_p}%} to red stained glass pane named "&c&lMettre à 1"
                set slot 20 of {_buy.%{_p}%} to red stained glass pane named "&c&lEnlever 1"
        if {_n.%{_p}%} is higher than 10:
                set slot 19 of {_buy.%{_p}%} to 10 of red stained glass pane named "&c&lEnlever 10"
        if {_n.%{_p}%} is lower than 64:
                set slot 24 of {_buy.%{_p}%} to green stained glass pane named "&a&lAjouter 1"
                set slot 26 of {_buy.%{_p}%} to 64 of green stained glass pane named "&a&lMettre à 64"
        if {_n.%{_p}%} is lower than 35:
                set slot 25 of {_buy.%{_p}%} to 10 of green stained glass pane named "&a&lAjouter 10"
        set slot 39 of {_buy.%{_p}%} to green stained glass named "&a&lConfirmer"
        set slot 41 of {_buy.%{_p}%} to red stained glass named "&c&lAnnuler"
        set {n.%{_p}%} to {_n.%{_p}%}
        set {item.%{_p}%} to {_item}
        set {price.%{_p}%} to {_price}
        open {_buy.%{_p}%} to {_p}```
#

I added a broadcast

#

when i choose item i have the correct name. But when I choose redstone lamp and daylight detector i have <none>

#
    if name of event-inventory is "&8Redstone | Page 2":
        cancel event
        if index of event-slot = 31:
            close inventory of player
            make player execute command "/shop"
        if index of event-slot = 30:
            close inventory of player
            make player execute command "/redstoneshop"
        if index of event-slot = 10:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Note Block", 25)
        if index of event-slot = 11:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Daylight Detector", 22)
        if index of event-slot = 12:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Lightning Rod", 20)
        if index of event-slot = 13:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Rail", 150)
        if index of event-slot = 14:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Powered Rail", 17.5)
        if index of event-slot = 15:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Detector Rail", 17.5)
        if index of event-slot = 16:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Activator Rail", 25)
        if index of event-slot = 19:
            close inventory of player
            set {n.%player%} to 1
            buy(player, "Minecart", 450)```
austere vale
#

Why cant you get straight the type item and not parse a string

cursive comet
#

why not

#

U think it's will solve the problem?

austere vale
#

Get those items that you have issues at your hand and parse this effect command "broadcast "%player's held item%"

cursive comet
#

normal daylight detector

#

but for redstone lamp is redstone lamp