Skbee Paste structure not working.

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

ghkhgkajtgfhjkcbg

New Member
Mar 6, 2023
7
0
1
17
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:
#why is this not working
command /dnastart:
    trigger:
        set {_loc1} to location(4, 115, 27) # Sets Locations
        set {_loc2} to location(-4, 101, 27)
        send "&aDNA1 Location Saved!"
        wait 2 seconds
        set {_loc3} to location(-30, 115, -34)
        set {_loc4} to location(-38, 101, -32)
        send "&aDNA2 Location Saved!"
        wait 2 seconds
        set {_loc5} to location(-12, 115, -30)
        set {_loc6} to location(-20, 101, -26)
        send "&aDNA3 Location Saved!"
        wait 2 seconds
        set {_loc7} to location(2, 115, -24)
        set {_loc8} to location(-6, 101, -18)
        send "&aDNA4 Location Saved!"
        wait 2 seconds
        set {_loc9} to location(-34, 115, -4)
        set {_loc10} to location(-26, 101, -12)
        send "&aDNA5 Location Saved!"
        wait 2 seconds
        set {_loc11} to location(24, 115, -2)
        set {_loc12} to location(32, 101, -10)
        send "&aDNA6 Location Saved!"
        wait 2 seconds
        set {_loc13} to location(34, 115, -25)
        set {_loc14} to location(42, 101, -33)
        send "&aDNA7 Location Saved!"
        wait 2 seconds
        set {_loc15} to location(-32, 115, 17)
        set {_loc16} to location(-40, 101, 25)
        send "&aDNA8 Location Saved!"
        wait 1 second
        send "&aSaving Structures..."
        set {_1} to structure named "DNA1" # Sets the structure name
        save structure {_1} # Saves the structure
        send "&aDNA1 Saved!"
        wait 2 seconds
        set {_2} to structure named "DNA1"
        save structure {_2}
        send "&aDNA2 Saved!"
        wait 2 seconds
        set {_3} to structure named "DNA1"
        save structure {_3}
        send "&aDNA3 Saved!"
        wait 2 seconds
        set {_4} to structure named "DNA1"
        save structure {_4}
        send "&aDNA4 Saved!"
        wait 2 seconds
        set {_5} to structure named "DNA1"
        save structure {_5}
        send "&aDNA5 Saved!"
        wait 2 seconds
        set {_6} to structure named "DNA1"
        save structure {_6}
        send "&aDNA6 Saved!"
        wait 2 seconds
        set {_7} to structure named "DNA1"
        save structure {_7}
        send "&aDNA7 Saved!"
        wait 2 seconds
        set {_8} to structure named "DNA1"
        save structure {_8}
        send "&aDNA8 Saved!"
        wait 1 second
        send "&aPasting Structures..."
        wait 1 second
        set {_1} to structure named "DNA1"
        fill structure {_1} between {loc1} and {loc2}
        place structure {_1} at location(0, 131, 0) # Pastes the structure
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_2} to structure named "DNA2"
        fill structure {_2} between {loc3} and {loc4}
        place structure {_2} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_3} to structure named "DNA3"
        fill structure {_3} between {loc5} and {loc6}
        place structure {_3} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_4} to structure named "DNA4"
        fill structure {_4} between {loc7} and {loc8}
        place structure {_4} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_5} to structure named "DNA5"
        fill structure {_5} between {loc9} and {loc10}
        place structure {_5} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_6} to structure named "DNA6"
        fill structure {_6} between {loc11} and {loc12}
        place structure {_6} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_7} to structure named "DNA7"
        fill structure {_7} between {loc13} and {loc14}
        place structure {_7} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 10 seconds
        set {_8} to structure named "DNA8"
        fill structure {_8} between {loc15} and {loc16}
        place structure {_8} at location(0, 131, 0)
        send "&aLoaded Successfully"
        wait 2 seconds
        send "&aDNA Strand Animation Complete!"
 
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!
 
how do I change my local variable to a global?
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.
 
Status
Not open for further replies.