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.

Skbee Paste structure not working.

Discussion in 'Skript' started by ghkhgkajtgfhjkcbg, Mar 6, 2023.

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

    Joined:
    Mar 6, 2023
    Messages:
    4
    Likes Received:
    0
    I don't know why this isn't working, there are no console or skript reload errors. The messages work as needed just when it comes to pasting nothing is loaded.

    This is for extra credit at my school and I'm trying to do something different from everyone else.

    Code (Text):
    1. #why is this not working
    2. command /dnastart:
    3.     trigger:
    4.         set {_loc1} to location(4, 115, 27) # Sets Locations
    5.         set {_loc2} to location(-4, 101, 27)
    6.         send "&aDNA1 Location Saved!"
    7.         wait 2 seconds
    8.         set {_loc3} to location(-30, 115, -34)
    9.         set {_loc4} to location(-38, 101, -32)
    10.         send "&aDNA2 Location Saved!"
    11.         wait 2 seconds
    12.         set {_loc5} to location(-12, 115, -30)
    13.         set {_loc6} to location(-20, 101, -26)
    14.         send "&aDNA3 Location Saved!"
    15.         wait 2 seconds
    16.         set {_loc7} to location(2, 115, -24)
    17.         set {_loc8} to location(-6, 101, -18)
    18.         send "&aDNA4 Location Saved!"
    19.         wait 2 seconds
    20.         set {_loc9} to location(-34, 115, -4)
    21.         set {_loc10} to location(-26, 101, -12)
    22.         send "&aDNA5 Location Saved!"
    23.         wait 2 seconds
    24.         set {_loc11} to location(24, 115, -2)
    25.         set {_loc12} to location(32, 101, -10)
    26.         send "&aDNA6 Location Saved!"
    27.         wait 2 seconds
    28.         set {_loc13} to location(34, 115, -25)
    29.         set {_loc14} to location(42, 101, -33)
    30.         send "&aDNA7 Location Saved!"
    31.         wait 2 seconds
    32.         set {_loc15} to location(-32, 115, 17)
    33.         set {_loc16} to location(-40, 101, 25)
    34.         send "&aDNA8 Location Saved!"
    35.         wait 1 second
    36.         send "&aSaving Structures..."
    37.         set {_1} to structure named "DNA1" # Sets the structure name
    38.         save structure {_1} # Saves the structure
    39.         send "&aDNA1 Saved!"
    40.         wait 2 seconds
    41.         set {_2} to structure named "DNA1"
    42.         save structure {_2}
    43.         send "&aDNA2 Saved!"
    44.         wait 2 seconds
    45.         set {_3} to structure named "DNA1"
    46.         save structure {_3}
    47.         send "&aDNA3 Saved!"
    48.         wait 2 seconds
    49.         set {_4} to structure named "DNA1"
    50.         save structure {_4}
    51.         send "&aDNA4 Saved!"
    52.         wait 2 seconds
    53.         set {_5} to structure named "DNA1"
    54.         save structure {_5}
    55.         send "&aDNA5 Saved!"
    56.         wait 2 seconds
    57.         set {_6} to structure named "DNA1"
    58.         save structure {_6}
    59.         send "&aDNA6 Saved!"
    60.         wait 2 seconds
    61.         set {_7} to structure named "DNA1"
    62.         save structure {_7}
    63.         send "&aDNA7 Saved!"
    64.         wait 2 seconds
    65.         set {_8} to structure named "DNA1"
    66.         save structure {_8}
    67.         send "&aDNA8 Saved!"
    68.         wait 1 second
    69.         send "&aPasting Structures..."
    70.         wait 1 second
    71.         set {_1} to structure named "DNA1"
    72.         fill structure {_1} between {loc1} and {loc2}
    73.         place structure {_1} at location(0, 131, 0) # Pastes the structure
    74.         send "&aLoaded Successfully"
    75.         wait 10 seconds
    76.         set {_2} to structure named "DNA2"
    77.         fill structure {_2} between {loc3} and {loc4}
    78.         place structure {_2} at location(0, 131, 0)
    79.         send "&aLoaded Successfully"
    80.         wait 10 seconds
    81.         set {_3} to structure named "DNA3"
    82.         fill structure {_3} between {loc5} and {loc6}
    83.         place structure {_3} at location(0, 131, 0)
    84.         send "&aLoaded Successfully"
    85.         wait 10 seconds
    86.         set {_4} to structure named "DNA4"
    87.         fill structure {_4} between {loc7} and {loc8}
    88.         place structure {_4} at location(0, 131, 0)
    89.         send "&aLoaded Successfully"
    90.         wait 10 seconds
    91.         set {_5} to structure named "DNA5"
    92.         fill structure {_5} between {loc9} and {loc10}
    93.         place structure {_5} at location(0, 131, 0)
    94.         send "&aLoaded Successfully"
    95.         wait 10 seconds
    96.         set {_6} to structure named "DNA6"
    97.         fill structure {_6} between {loc11} and {loc12}
    98.         place structure {_6} at location(0, 131, 0)
    99.         send "&aLoaded Successfully"
    100.         wait 10 seconds
    101.         set {_7} to structure named "DNA7"
    102.         fill structure {_7} between {loc13} and {loc14}
    103.         place structure {_7} at location(0, 131, 0)
    104.         send "&aLoaded Successfully"
    105.         wait 10 seconds
    106.         set {_8} to structure named "DNA8"
    107.         fill structure {_8} between {loc15} and {loc16}
    108.         place structure {_8} at location(0, 131, 0)
    109.         send "&aLoaded Successfully"
    110.         wait 2 seconds
    111.         send "&aDNA Strand Animation Complete!"
     
  2. Zhync

    Zhync Active Member

    Joined:
    Feb 11, 2022
    Messages:
    85
    Likes Received:
    5
    Hi. I'm not entirely confident in SkBee's structures, however I did notice a few things:
    - I'm pretty sure you're supposed to fill structures before you save them.
    - When you fill structures, you're referring to global variables called {loc%int%}, when you saved them as local variables.
    - You're saving all the structures under the same name; Try checking the world file for the structures and see if they're overwriting each other.

    Hope this helped, and I hope you get that extra credit!
     
  3. ghkhgkajtgfhjkcbg

    Joined:
    Mar 6, 2023
    Messages:
    4
    Likes Received:
    0
    how do I change my local variable to a global?
     
  4. Zhync

    Zhync Active Member

    Joined:
    Feb 11, 2022
    Messages:
    85
    Likes Received:
    5
    You'd want to do it the other way around, since you (probably) don't need to hold onto these variables afterwards; only the structure.
    Local variables are any variable prefixed with a "_": {_loc}, {_aoiejf0}, etc. They're only saved within the context that they're used.
    Just change the variables past line 72 to have a _ beforehand if they don't already, and see if that works.

    Also, make sure to address some of the other concerns I mentioned before as well, just incase.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...