#Unsure why code not working

1 messages · Page 1 of 1 (latest)

wispy dagger
#
    if "%region at player%" contains "elevator":
        if player has permission "Class-D":
            set {_inelevator} to true
            send "&l&410 seconds until your CI!" to player
            wait 1 second
            if {_inelevator} is true: 
                send "&l&49 seconds until your CI!" to player 
                wait 1 second    
                if {_inelevator} is true:
                    send "&l&48 seconds until your CI!" to player
                    wait 1 second
                    if {_inelevator} is true:
                        send "&l&47 seconds until your CI!" to player
                        wait 1 second
                        if {_inelevator} is true:
                            send "&l&46 seconds until your CI!" to player 
                            wait 1 second
                            if {_inelevator} is true:
                                send "&l&45 seconds until your CI!" to player
                                wait 1 second
                                if {_inelevator} is true:
                                    send "&l&44 seconds until your CI!" to player
                                    wait 1 second
                                    if {_inelevator} is 
(see Inside for second half)```
#
                                        send "&l&43 seconds until your CI!" to player
                                        wait 1 second
                                        if {_inelevator} is true:
                                            send "&l&42 seconds until your CI!" to player
                                            wait 1 second
                                            if {_inelevator} is true:
                                                send "&l&41 second until your CI!" to player
                                                wait 1 second
                                                teleport player to location(321.99,-28,-98.99, world "world")
                                                execute console command "lp user %player% parent set ciconscript"
                                                give player {kit::CI::conscript::*+}          
on region exit:
    if "%region at player%" does not contain "elevator":
        set {_inelevator} to false
        
        
on death:
    if victim has permission "CI":
        execute console command "lp user %victim% parent set default"``` I'm unsure why this is not working as i am going in as op (having all perms) and the region is set. If your looking for the problem i didnt know how to word it in this so the problem is when i walk in the region nothing happens like at all i dont get a message nothing
#

Im sorry about the spitting up dont got nitro so cant upload code that long

sly spade
#

holy indentations

#

just use a loop, loop 10 times: broadcast 10 - loop-iteration wait 1 second

wispy dagger
#

Can you give me a example of what your saying im confused on how i would use that

#

but even with that will that help my situation

sly spade
#

Try the code

#

Instead of copy pasting lines, use a loop

wispy dagger
#

alr

#

If I do it like that it gives me the error expecting less tabs but if i put less it would be inside the loop is there a work around?

#

@sly spade?

graceful patio
#

what say the server console? if you load the script it tell you a lot where the problem are

wispy dagger
#

same thing

#

but i found a trick i learned a long time ago and it made my og skript work

#

but now i got a new problem lol

graceful patio
#

always the same

wispy dagger
#

wdym?

graceful patio
#

you solve one you receive 10

wispy dagger
#

anyways the new problem is my var {_inelevator} isnt working so when i leave the region it isnt set to false

wispy dagger
sly spade
#

Adjust the indentation

wispy dagger
brittle skiff
#

another thing add a wait 1 tick after on region enter: