Solved Painting Skript Issue

  • 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.
Skript Version : Skript 2.3 (Probably, Using the Server Host Minehut which doesn't specify version)
Skript Addons: SkQuery
Skript Author: KethTheMeifwa
Minecraft Version: 1.14.1

So I'm trying to make a painting program that allows the user to choose a color from a gui on right click, and then color over only concrete blocks with the selected color on left click. Can someone help me fix my code? I'm new to skript xD

Full Code:
Code:
on left click:
    player is holding a shovel:
        if block is concrete:
            set block to {color.%player%} concrete
on right click:
    player is holding a shovel:
        open chest with 5 row named "&c&lColors" to player
        wait 1 tick
        format slot 0 of player with gray glass pane named " " to close
        format slot 1 of player with gray glass pane named " " to close
        format slot 2 of player with gray glass pane named " " to close
        format slot 3 of player with gray glass pane named " " to close
        format slot 4 of player with gray glass pane named " " to close
        format slot 5 of player with gray glass pane named " " to close
        format slot 6 of player with gray glass pane named " " to close
        format slot 7 of player with gray glass pane named " " to close
        format slot 8 of player with gray glass pane named " " to close
        format slot 9 of player with gray glass pane named " " to close
        format slot 10 of player with white concrete named "&f&lWhite" to close then set {color.%player%} to white
        format slot 11 of player with light gray concrete named "&7&lLight Gray" to close then set {color.%player%} to light gray
        format slot 12 of player with gray concrete named "&8&lGray" to close then set {color.%player%} to gray
        format slot 13 of player with black concrete named "&0&lBlack" to close then set {color.%player%} to black
        format slot 14 of player with brown concrete named "&7&lBrown" to close then set {color.%player%} to brown
        format slot 17 of player with gray glass pane named " " to close
        format slot 18 of player with gray glass pane named " " to close
        format slot 26 of player with gray glass pane named " " to close
        format slot 27 of player with gray glass pane named " " to close
        format slot 35 of player with gray glass pane named " " to close
        format slot 36 of player with gray glass pane named " " to close
        format slot 37 of player with gray glass pane named " " to close
        format slot 38 of player with gray glass pane named " " to close
        format slot 39 of player with gray glass pane named " " to close
        format slot 40 of player with gray glass pane named " " to close
        format slot 41 of player with gray glass pane named " " to close
        format slot 42 of player with gray glass pane named " " to close
        format slot 43 of player with gray glass pane named " " to close
        format slot 44 of player with gray glass pane named " " to close
Errors on Reload (From the Parser because I don't have console access):
Code:
Line 3: Can't compare a block with 'concrete' (script.sk, line 3: if block is concrete:')

Line 20: Can't understand this condition/effect: format slot 10 of player with white concrete named "&f&lWhite" to close then set {color.%player%} to white (line 25: format slot 10 of player with white concrete named "&f&lWhite" to close then set {color.%player%} to white') (The Parser doesn't support every syntax element.)

Line 21: Can't understand this condition/effect: format slot 11 of player with light gray concrete named "&7&lLight Gray" to close then set {color.%player%} to light gray (line 26: format slot 11 of player with light gray concrete named "&7&lLight Gray" to close then set {color.%player%} to light gray') (The Parser doesn't support every syntax element.)

Line 22: Can't understand this condition/effect: format slot 12 of player with gray concrete named "&8&lGray" to close then set {color.%player%} to gray (line 27: format slot 12 of player with gray concrete named "&8&lGray" to close then set {color.%player%} to gray') (The Parser doesn't support every syntax element.)

Line 23: Can't understand this condition/effect: format slot 13 of player with black concrete named "&0&lBlack" to close then set {color.%player%} to black (line 28: format slot 13 of player with black concrete named "&0&lBlack" to close then set {color.%player%} to black') (The Parser doesn't support every syntax element.)

Line 24: Can't understand this condition/effect: format slot 14 of player with brown concrete named "&7&lBrown" to close then set {color.%player%} to brown (line 29: format slot 14 of player with brown concrete named "&7&lBrown" to close then set {color.%player%} to brown') (The Parser doesn't support every syntax element.)
 
Use a minecraft:concrete value or ID like black concrete > 251:1
If that doesn't work, tell me.
[doublepost=1558978064,1558978005][/doublepost]Or use: minecraft:white_concrete

> minecraft:COLOR_concrete
 
Use a minecraft:concrete value or ID like black concrete > 251:1
If that doesn't work, tell me.
[doublepost=1558978064,1558978005][/doublepost]Or use: minecraft:white_concrete

> minecraft:COLOR_concrete
If I remove the "then set {color.%player%} to white" then the white concrete shows up as just a block that closes the menu, so I figured it would be the same for the rest of it, but I'll try it
 
Instead setting the block to {color.%player%} concrete, just set the variable in the gui to for example "brown concrete" not "brown." Also fixed the shovel thing. Hopefully this helps!

Code:
on left click:
    player's tool is a shovel:
        event-block is concrete:
            set event-block to {color.%player%}
on right click:
    player's tool is a shovel:
        open chest with 5 row named "&c&lColors" to player
        wait 1 tick
        format slot 0 of player with gray glass pane named " " to close
        format slot 1 of player with gray glass pane named " " to close
        format slot 2 of player with gray glass pane named " " to close
        format slot 3 of player with gray glass pane named " " to close
        format slot 4 of player with gray glass pane named " " to close
        format slot 5 of player with gray glass pane named " " to close
        format slot 6 of player with gray glass pane named " " to close
        format slot 7 of player with gray glass pane named " " to close
        format slot 8 of player with gray glass pane named " " to close
        format slot 9 of player with gray glass pane named " " to close
        format slot 10 of player with white concrete named "&f&lWhite" to close then run [set {color.%player%} to white concrete]
        format slot 11 of player with light gray concrete named "&7&lLight Gray" to close then run [set {color.%player%} to light gray concrete]
        format slot 12 of player with gray concrete named "&8&lGray" to close then run [set {color.%player%} to gray concrete]
        format slot 13 of player with black concrete named "&0&lBlack" to close then run [set {color.%player%} to black concrete]
        format slot 14 of player with brown concrete named "&7&lBrown" to close then run [set {color.%player%} to brown concrete]
        format slot 17 of player with gray glass pane named " " to close
        format slot 18 of player with gray glass pane named " " to close
        format slot 26 of player with gray glass pane named " " to close
        format slot 27 of player with gray glass pane named " " to close
        format slot 35 of player with gray glass pane named " " to close
        format slot 36 of player with gray glass pane named " " to close
        format slot 37 of player with gray glass pane named " " to close
        format slot 38 of player with gray glass pane named " " to close
        format slot 39 of player with gray glass pane named " " to close
        format slot 40 of player with gray glass pane named " " to close
        format slot 41 of player with gray glass pane named " " to close
        format slot 42 of player with gray glass pane named " " to close
        format slot 43 of player with gray glass pane named " " to close
        format slot 44 of player with gray glass pane named " " to close
 
Instead setting the block to {color.%player%} concrete, just set the variable in the gui to for example "brown concrete" not "brown." Also fixed the shovel thing. Hopefully this helps!

Code:
on left click:
    player's tool is a shovel:
        event-block is concrete:
            set event-block to {color.%player%}
on right click:
    player's tool is a shovel:
        open chest with 5 row named "&c&lColors" to player
        wait 1 tick
        format slot 0 of player with gray glass pane named " " to close
        format slot 1 of player with gray glass pane named " " to close
        format slot 2 of player with gray glass pane named " " to close
        format slot 3 of player with gray glass pane named " " to close
        format slot 4 of player with gray glass pane named " " to close
        format slot 5 of player with gray glass pane named " " to close
        format slot 6 of player with gray glass pane named " " to close
        format slot 7 of player with gray glass pane named " " to close
        format slot 8 of player with gray glass pane named " " to close
        format slot 9 of player with gray glass pane named " " to close
        format slot 10 of player with white concrete named "&f&lWhite" to close then run [set {color.%player%} to white concrete]
        format slot 11 of player with light gray concrete named "&7&lLight Gray" to close then run [set {color.%player%} to light gray concrete]
        format slot 12 of player with gray concrete named "&8&lGray" to close then run [set {color.%player%} to gray concrete]
        format slot 13 of player with black concrete named "&0&lBlack" to close then run [set {color.%player%} to black concrete]
        format slot 14 of player with brown concrete named "&7&lBrown" to close then run [set {color.%player%} to brown concrete]
        format slot 17 of player with gray glass pane named " " to close
        format slot 18 of player with gray glass pane named " " to close
        format slot 26 of player with gray glass pane named " " to close
        format slot 27 of player with gray glass pane named " " to close
        format slot 35 of player with gray glass pane named " " to close
        format slot 36 of player with gray glass pane named " " to close
        format slot 37 of player with gray glass pane named " " to close
        format slot 38 of player with gray glass pane named " " to close
        format slot 39 of player with gray glass pane named " " to close
        format slot 40 of player with gray glass pane named " " to close
        format slot 41 of player with gray glass pane named " " to close
        format slot 42 of player with gray glass pane named " " to close
        format slot 43 of player with gray glass pane named " " to close
        format slot 44 of player with gray glass pane named " " to close
Thank you that fixed it!
 
Status
Not open for further replies.