Is anything wrong?

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

Wugg

Member
Jun 19, 2017
13
0
0
20
So currently I'm making a sign elevator but for some reason whenever I right click it, it doesn't register it as a correct sign.

code_language.skript:
# Creating the Up and Down elevators.

on sign change:
    line 1 is "[Elevator]":
        set line 1 to "&4[Elevator]"
        if line 2 is "up":
            set line 2 to "&9Up"
        else if line 2 is "down":
            set line 2 to "&9Down"
        else:
            set line 2 to "&4&lERROR"
     
# Teleportation between the two signs.

on rightclick on sign:
    line 1 is "&4[Elevator]":
        if line 2 is "&9Up":
            set {_loc} to location of clicked block
            wait 1 tick
            loop 6 times:
                if line 2 of clicked block is "&9Up":
                    add 1 to y coords of {_loc}
                    send "%{_loc}%"
                    if block at {_loc} is sign:
                        if line 2 of event-block contains "&9Down":
                            send "hi"
                        else:
                            send "t"

It would say "t" instead of "hi". Am I missing something. I have the conditions correct.

The reload says there are no errors.
 
Last edited:
I'm a little confused but I if I'm correctly understanding what you wanna do then "event-block" in line 27 should be "block at {_loc}" because event-block would be the sign you clicked
 
I did that. It still doesn't work. Is it a bug or something? I have made it into a simpler form for just detecting the sign and that works but I want it to have the &9Down as the second line of the sign.

code_language.skript:
# Creating the Up and Down elevators.

on sign change:
    line 1 is "[Elevator]":
        set line 1 to "&4[Elevator]"
        if line 2 is "up":
            set line 2 to "&9Up"
        else if line 2 is "down":
            set line 2 to "&9Down"
        else:
            set line 2 to "&4&lERROR"
         
# Teleportation between the two signs.

on rightclick on sign:
    line 1 is "&4[Elevator]":
        if line 2 is "&9Up":
            set {_loc} to location of clicked block
            wait 1 tick
            loop 6 times:
                if line 2 of clicked block is "&9Up":
                    add 1 to y coords of {_loc}
                    send "%{_loc}%"
                    if block at {_loc} is a sign:
                        send "hi"
                    else:
                        send "t"
 
Last edited by a moderator:
Hmm. Try broadcasting "%line 2 of block at {_loc}%" and see what it says.
[doublepost=1497838443,1497837938][/doublepost]Wait i just realized in your original post you're using "if line 2 of event-block contains "&9Down"

Try:
code_language.skript:
if line 2 of block at {_loc} is "&9Down":
 
Try
code_language.skript:
set {_line2} to line 2 of block at {_loc}
set {_line2} to uncolored {_line2} 
if {_line2} is "Down":
    #stuff
 
Did you mean like this? I changed the color format to non colored in # Creating the Up and Down elevators.

code_language.skript:
# Creating the Up and Down elevators.

on sign change:
    line 1 is "[Elevator]":
        set line 1 to "&4[Elevator]"
        if line 2 is "up":
            set line 2 to "Up"
        else if line 2 is "down":
            set line 2 to "Down"
        else:
            set line 2 to "&4&lERROR"
           
# Teleportation between the two signs.

on rightclick on sign:
    line 1 is "&4[Elevator]":
        if line 2 is "Up":
            set {_loc} to location of clicked block
            wait 1 tick
            loop 6 times:
                if line 2 of clicked block is "Up":
                    add 1 to y coords of {_loc}
                    send "%{_loc}%"
                    if line 2 of block at {_loc} is "Down":
                        send "hi"
                    else:
                        send "t"

I have
Skript
skRayFall
skQuery
UmbaskaJava7
Skellet
SkMorkaz
SkAction
SharpSK
 
No I meant:
code_language.skript:
on sign change:
    line 1 is "[Elevator]":
        set line 1 to "&4[Elevator]"
        if line 2 is "up":
            set line 2 to "&9Up"
        else if line 2 is "down":
            set line 2 to "&9Down"
        else:
            set line 2 to "&4&lERROR"
    
# Teleportation between the two signs.

on rightclick on sign:
    line 1 is "&4[Elevator]":
        if line 2 is "&9Up":
            set {_loc} to location of clicked block
            wait 1 tick
            loop 6 times:
                if line 2 of clicked block is "&9Up":
                    add 1 to y coords of {_loc}
                    send "%{_loc}%"
                    if block at {_loc} is sign:
                        set {_line2} to line 2 of block at {_loc}
                        set {_line2} to uncolored {_line2}
                        if {_line2} is "Down"
                            send "hi"
                        else:
                            send "t"
But if what you sent doesn't work then this probably won't either.

Try this:
code_language.skript:
if "%line 2 of block at {_loc}%" contains "Down":
    #stuff
[doublepost=1497909541,1497909451][/doublepost]Or
code_language.skript:
if "%uncolored line 2 of block at {_loc}%" contains "Down":
[doublepost=1497909646][/doublepost]Or
code_language.skript:
if "%line 2 of block at {_loc}%" contains "&9Down":
 
That didn't work but instead of making it send "t" I made it send "%line 2 of block at {_loc}%" and it said <none>. Is it suppose to be like that?
 
So i tested and this works:
code_language.skript:
on rightclick on sign:
    line 1 is "&4[Elevator]":
        if line 2 is "&9Up":
            set {_loc} to location of clicked block
            wait 1 tick
            loop 6 times:
                if line 2 of clicked block is "&9Up":
                    add 1 to y coords of {_loc}
                    if block at {_loc} is sign:
                        if line 2 of block at {_loc} is "&9Down":
                            send "hi"
                        else:
                            send "t"

So I guess its your server/skript/addons version
 
2.1.2? Are you using bensku's fork? and what does skript minecraft version mean... theres a skript version and a minecraft version but no skript minecraft version
 
Ahh I see. Besku has the latest skript versions. Idk if they work for 1.8. I think they do but don't quote me on that. If you're not using his fork that's probably why this isn't working
 
Then I recommend making your server 1.11 and use bensku's skript. You can get the plugin, protocol support, to allow 1.7 and 1.8 clients to join
 
Status
Not open for further replies.