#problem with skript

1 messages · Page 1 of 1 (latest)

weak bone
#

i have 130 errors

#

XD

#

WHATS WRONG

#

I WILL FIX IT

#

hm

#

same problem

#

what?

#

u want translate?

#

command /restart <text>:
trigger:
send title "&4&lZa 60 sekund odbedzie sie restart" with subtitle "&4Z powodu: &c%arg-1%" to all players
wait 1 second

#

this?

pallid prism
#

holy shit man use a loop

#

also indent your code

weak bone
#

line 4

pallid prism
#
command /restart <text>:
    trigger:
        send title "&4&lZa 60 sekund odbedzie sie restart" with subtitle "&4Z powodu: &c%arg-1%" to all players
        wait 1 second
        loop 60 times:
            send action bar "&cRestart odbędzie się za %61 - loop-value% sekund" to all players
            wait 1 second
        
        stop server
flat locust
#

wait a second works
2nd off it's related to indents once he fixes indents it will be much less errors hopefully

pallid prism
#

if they fix the indents it will be no errors

pallid prism
#

it'll still be bad code tho

weak bone
#

no errors

weak bone
flat locust
pallid prism
#

fair

flat locust
#

that's like asking me to use algorithms despite the fact I don't take the time to even learn them

pallid prism
#

sauvero as a rule of thumb, whenever you find yourself copy-pasting code, see if you can use a loop instead

flat locust
#

or use a function if applicable to code

pallid prism
#

true, if you know how to use those

weak bone
#

and 1 question

#

where can i disable phantoms spawn

#

XDD

pallid prism
#

there's a gamerule for that

flat locust
#

otherwise use the on spawn of phantoms event and cancel

#

nope just need to cancel the event

#

one requires it to spawn the other just ends stops it entirely

#

1 will call multiple times
another will call only for phantoms

weak bone
#

@pallid prism AND

#

is there option

#

to make command

#

like /stoprestart

#

to stop this?

pallid prism
#

you could do that yes

#

you'd need to add something like

if {stop-restart} is true:
    stop
``` in the loop
#

than then just set that variable to true in the /stoprestart command

weak bone
#

@pallid prism i have one problem

#

command /restart <text>:
permission: sauvero.restart
permission message: co ty kurwo probujesz
trigger:
set {stop-restart} to false
send title "&4&lZa 60 sekund odbedzie sie restart" with subtitle "&4Z powodu: &c%arg-1%" to all players for 5 seconds
wait 1 second
loop 60 times:
if {stop-restart} is true:
stop
else:
send action bar "&cRestart odbędzie się za %61 - loop-value% sekund" to all players
wait 1 second

    stop server
pallid prism
#

your indentation is wrong

weak bone
#

i dont know how to fix it XD

pallid prism
sick depot
#

move 4th, 2nd, and 1st last line one more way to the right

#

In skript whenever you see a : next line needs to be indented one space/tab more than the line prior

weak bone
#

im stupid

#

i dont know how to fix it

#

XD

sick depot
#

indented one space/tab more than the line prior

#

Bro read the link Spookde sent you

weak bone
#

im reading

sick depot
#

Good then it should resolve your issue

weak bone
#

@pallid prism help me

#

im stupid

#

i readed that

sick depot
#

The full article?

weak bone
#

and i dont know whats wrong

pallid prism
#

please stop @ing me

sick depot
#

Read

weak bone
sick depot
#

Bro

#

Read

#

move "stop", "send action bar restart..." 1 tab forward