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.

Solved What is Wrong With My Script

Discussion in 'Skript' started by rustedst, May 14, 2020.

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

    rustedst Active Member

    Joined:
    Apr 24, 2020
    Messages:
    97
    Likes Received:
    4
    I have a script which is less than 90 lines (and contains foreign language messages) but Skript won't load it. It doesn't have any infinite loops or anything but when Skript starts to load it at start it doesn't give any error but doesn't load the script either.
    Code (Text):
    1.  
    2. on rightclick:
    3.     player is sneaking:
    4.         if {teklif::%target player%::%player%} is true:
    5.             set {teklif::%player%::%target player%} to true
    6.             set {ticaret::%player%} to true
    7.             set {ticaret::%target player%} to true
    8.             open chest inventory with 3 rows named "&cTicaret" to player
    9.             set slot 3 of player's current inventory to red stained glass named "&4Hazır Değilsin"
    10.             set slot 4 and 13 and 22 and 31 of player's current inventory to black stained glass named " "
    11.             set slot 5 of player's current inventory to red stained glass named "&4%{nick::%target player%}% Hazır Değil"
    12.         else if {teklif::%target player%::*} is set:
    13.             send "&c%{nick::%target player%}% zaten biriyle ticaret yapıyor." to player
    14.         else:
    15.             send "&a%player% seninle ticaret yapmak istiyor." to target player
    16.             execute console command "tm amessage %target player% &a%player% seninle ticaret yapmak istiyor."
    17.             set {teklif::%player%::%target player%} to true
    18. on inventory click:
    19.     if display name of event-inventory is "&cTicaret":
    20.         if event-slot is slot 3 of event-inventory or slot 4 of event-inventory or slot 5 of event-inventory or slot 13 of event-inventory or slot 22 of event-inventory or slot 31 of event-inventory:
    21.             cancel event
    22.             if event-slot is slot 3 of event-inventory:
    23.                 if event slot is red stained glass named "&4Hazır Değilsin":
    24.                     set slot 3 of player's current inventory to green stained glass named "&aHazırsın"
    25.                     loop {teklif::%player%::*}:
    26.                         set slot 5 of (loop-value parsed as player)'s current inventory to green stained glass named "&a%player% Hazır"
    27.                         if slot 3 of (loop-value parsed as player)'s current inventory is green stained glass named "&aHazırsın":
    28.                             set {_say} to 0
    29.                             set {_sayma} to 0
    30.                             set {_taraf} to 2
    31.                             loop 36 times:
    32.                                 if {_say} is not 3 or 4 or 5 or 13 or 22 or 31:
    33.                                     if {_taraf} is divisible by 2:
    34.                                         give (loop-value parsed as player) slot {_say} of event-inventory
    35.                                     else:
    36.                                         give player slot {_say} of event-inventory
    37.                                 if {_sayma} is 4:
    38.                                     set {_sayma} to 0
    39.                                     add 1 to {_taraf}
    40.                                 add 1 to {_say}
    41.                                 add 1 to {_sayma}
    42.                             loop {teklif::%player%::*}:
    43.                                 delete {teklif::%loop-value%::%player%}
    44.                                 close (loop-value parsed as player)'s current inventory
    45.                             delete {teklif::%player%::*}
    46.                             close player's current inventory
    47.                 else:
    48.                     set slot 3 of player's current inventory to red stained glass named "&4Hazır Değilsin"
    49.                     loop {teklif::%player%::*}:
    50.                         set slot 5 of (loop-value parsed as player)'s current inventory to red stained glass named "&4%player% Hazır Değil"
    51.         else:
    52.             if event slot is slot 6 of event-inventory or slot 7 of event-inventory or slot 8 of event-inventory or slot 14 of event-inventory or slot 15 of event-inventory or slot 16 of event-inventory or slot 17 of event-inventory or slot 23 of event-inventory or slot 24 of event-inventory or slot 25 of event-inventory or slot 26 of event-inventory or slot 32 of event-inventory or slot 33 of event-inventory or slot 34 of event-inventory or slot 35 of event-inventory:
    53.                 cancel event
    54.             else:
    55.                 set slot 3 of player's current inventory to red stained glass named "&4Hazır Değilsin"
    56.                 loop {teklif::%player%::*}:
    57.                     set slot 5 of (loop-value parsed as player)'s current inventory to red stained glass named "&4%player% Hazır Değil"
    58.                     set {_say} to 5
    59.                     set {_sayma} to 1
    60.                     loop 16 times:
    61.                         if {_say} is not 5:
    62.                             set slot {_say} of (loop-value parsed as player)'s current inventory to event-slot
    63.                         if {_sayma} = 4:
    64.                             set {_sayma} to 1
    65.                             add 6 to {_say}
    66.                         add 1 to {_say}
    67.                         add 1 to {_sayma}
    68. on inventory close:
    69.     if display name of event-inventory is "&cTicaret":
    70.         if {teklif::%player%::*} is not set:
    71.             send "&2El sıkışarak ticareti sonlandırdınız." to player
    72.         else:
    73.             loop {teklif::%player%::*}:
    74.                 loop 36 times:
    75.                     if {_say} is not 3 or 4 or 5 or 13 or 22 or 31:
    76.                         if {_taraf} is divisible by 2:
    77.                             give player slot {_say} of event-inventory
    78.                         else:
    79.                             give (loop-value parsed as player) slot {_say} of event-inventory
    80.                     if {_sayma} is 4:
    81.                         set {_sayma} to 0
    82.                         add 1 to {_taraf}
    83.                     add 1 to {_say}
    84.                     add 1 to {_sayma}
    85.                 send "&4%player% ticaretten vazgeçti." to (loop-value parsed as player)
    86.             send "&cTicaretten vazgeçtiniz" to player
    87.  
    --- Double Post Merged, May 14, 2020, Original Post Date: May 14, 2020 ---
    And this is what skUnity parser says:
    --- Double Post Merged, May 14, 2020 ---
    I found the reason: some lines are too long, I spilted them into lines and it worked
     
Thread Status:
Not open for further replies.

Share This Page

Loading...