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

Shop Help [Skript]

Discussion in 'Skript' started by Breezy, Jul 5, 2019.

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

    Breezy Member

    Joined:
    Jul 5, 2019
    Messages:
    4
    Likes Received:
    0
    I am currently working on a skript, for a farming server. I have the basics down for this skript, but I can't understand why a part of this skript is not working. (Its like all the other parts) The skript I am trying to work on is a /shop skript. Here is a image of the skript thats not currently working. [​IMG]
    and here is a image of the skript that DOES work. [​IMG]
    I am fairly new to skripting so I'm not 100% sure why its not working. Thanks if anyone helps! (All of these skripts have been tested and yes, all but the one I need help with works)
     
  2. SigZombie

    SigZombie Member

    Joined:
    Jul 30, 2017
    Messages:
    7
    Likes Received:
    0
    It could be the image, but I think I think that by trying to put ':' at the end of "to run", the script could work
     
  3. TPGamesNL

    TPGamesNL Well-Known Member

    Joined:
    Jan 20, 2018
    Messages:
    1,311
    Likes Received:
    73
    Medals:
    It's TuSKe
     
  4. Breezy

    Breezy Member

    Joined:
    Jul 5, 2019
    Messages:
    4
    Likes Received:
    0
    I'm able to do /sk reload shop (the name of my file) and whenever I do so, it says that theres a empty configuration section, (line 21) that theres an unexpected entry for 'else'., that it can't understand the condition/effect (line 20) and that '1 sugarcane' can't be added because the former is neither an item type, inventory nor an experience point. (line 22)
     
  5. SigZombie

    SigZombie Member

    Joined:
    Jul 30, 2017
    Messages:
    7
    Likes Received:
    0
    change syntax:

    Code (Text):
    1. command /Shop:
    2.   trigger:
    3.     wait 1 tick
    4.     open chest with 3 rows named "FIRST GUI NAME" to player
    5.     set slot 10 of player's current inventory to wheat named "FIRST ITEM NAME"
    6.  
    7. on inventory click:
    8.   if inventory name of player's current inventory is "FIRST GUI NAME":
    9.     cancel event
    10.     if clicked item is wheat named "FIRST ITEM NAME":
    11.       open chest with 3 rows named "SECOND GUI NAME" to player
    12.       wait 1 tick
    13.       set slot 10 of player's current inventory to potato named "SECOND ITEM NAME"
    14.       set slot 11 of player's current inventory to carrot named "THIRD ITEM NAME"
    15.       set slot 12 of player's current inventory to sugar cane named "FOURTH ITEM NAME"
    16.   if inventory name of player's current inventory is "SECOND GUI NAME":
    17.     cancel event
    18.     if clicked item is potato named "SECOND ITEM NAME":
    19.       if player's balance >= 30:
    20.         give potato to player
    21.         subtract 30 from player's balance
    22.         message "&7Successfully bought one potato"
    23.       else:
    24.         message "&7You do not have enought money"
    25.     if clicked item is carrot named "THIRD ITEM NAME":
    26.       if player's balance >= 40:
    27.         give carrot to player
    28.         subtract 40 from player's balance
    29.         message "&7Successfully bought one carrot"
    30.       else:
    31.         message "&7You do not have enought money"
    32.     #REPEAT FOR ANY ITEM
     
  6. Breezy

    Breezy Member

    Joined:
    Jul 5, 2019
    Messages:
    4
    Likes Received:
    0
    Doesn't seem to work...
     
  7. SigZombie

    SigZombie Member

    Joined:
    Jul 30, 2017
    Messages:
    7
    Likes Received:
    0
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    Im not sure which Skript version you are using, since you didn't state it, but if you are using 2.3+ its "sugar cane" not "sugarcane"
     
  9. Breezy

    Breezy Member

    Joined:
    Jul 5, 2019
    Messages:
    4
    Likes Received:
    0
    Oh, alright. Thanks for the help everyone!... Sorry that I had forgotten to put what skript version I was using but yes, it was 2.3+
     
Thread Status:
Not open for further replies.
Loading...