1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Set {_Block} Targeted Block Error

Discussion in 'Skript' started by InTheVan, Sep 16, 2017.

Thread Status:
Not open for further replies.
  1. InTheVan

    InTheVan Member

    Joined:
    Sep 16, 2017
    Messages:
    4
    Likes Received:
    0
    command /gen1 <text>:
    trigger:
    if player has permission "gen.admin":
    if arg 1 is "upgrade":
    if targeted block is cobblestone:
    set {_block} to targeted block:
    if player's level is larger than 59:
    reduce the player's level by 60
    if {vip.%Block%} is true:
    set {_block} {vip.%Block%} to false
    set {_block} {vip2.%Block%} to true
    send "&aGenerator has been upgraded"

    Im trying to make it upgrade aka change a block value from "{vip.%Block%}" to "{vip2.%Block%}" and its saying this. Please help me define {_block} as targeted block or a new method to do this.

    https://gyazo.com/a1683442f68c5e0d916dc81058a4632f
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Code (Skript):
    1. set {_block} to target block
     
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Ok that worked thanks, but now im running into another issue, https://gyazo.com/8d51002f3298f4968d24f5f8719823ad

    command /gen10 <text>:
    trigger:
    if player has permission "gen.admin":
    if arg 1 is "upgrade":
    if targeted block is cobblestone:
    set {_block} to target block
    if player's level is larger than 59:
    reduce the player's level by 60
    set {_block} to diamond ore
    if {vip.%Block%} is true:
    set {vip.%Block%} to false
    set {vip2.%Block%} to true
    send "&aGenerator has been upgraded"
    else:
    send "&8&l(&5&lDivine&7&lCrystals&8&l) &7You need to have atleast 60 levels to upgrade your generator!"
    stop
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    This?
    Code (Skript):
    1. command /gen10 <text>:
    2.     trigger:
    3.         if player has permission "gen.admin":
    4.             if arg 1 is "upgrade":
    5.                 if targeted block is cobblestone:
    6.                     set {_block} to target block
    7.                     if player's level is larger than 59:
    8.                         reduce the player's level by 60
    9.                         set {_block} to diamond ore
    10.                         if {vip.%{_block}%} is true:
    11.                             set {vip.%{_block}%} to false
    12.                             set {vip2.%{_block}%} to true
    13.                             message "&aGenerator has been upgraded"
    14.                         else:
    15.                             message "&8&l(&5&lDivine&7&lCrystals&8&l) &7You need to have atleast 60 levels to upgrade your generator!"
     
  5. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    225
    Thank you so so so much! I spend hours trying to do this
     
    • Friendly Friendly x 1
Thread Status:
Not open for further replies.

Share This Page

Loading...