Solved What is obstructing my Automatic Notification?

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

Danic

Member
Jul 23, 2020
42
0
6
Korea
www.youtube.com
I want to make the automatic notification system with skript.
What is the error that obstructs this code from working?

Code:
options:
    prefix: <server>

on join:
    delete {Automatic Notice}
    if gamemode of player is adventure:
        every 6 seconds:
            if {Automatic Notice} is not set:
                set {Automatic Notice} to 1
                broadcast "{@prefix} Notice 1"
                stop
                if {Automatic Notice} is 1:
                    set {Automatic Notice} to 2
                    broadcast "{@prefix} Notice 2"
                    stop
                if {Automatic Notice} is 2:
                    set {Automatic Notice} to 3
                    broadcast "{@prefix} Notice 3"
                    stop
                if {Automatic Notice} is 3:
                    set {Automatic Notice} to 4
                    broadcast "{@prefix} Notice 4"
                    stop
                if {Automatic Notice} is 4:
                    set {Automatic Notice} to 5
                    broadcast "{@prefix}Notice 5"
                    stop
                if {Automatic Notice} is 5:
                    set {Automatic Notice} to 6
                    broadcast "{@prefix} Notice 6"
                    stop
            else:
                stop

When I reload, this error occured.

Code:
Can't understand this condition: 'every 6 seconds' (Automatic Notice.sk, line 6: every 6 seconds:')
 
I want to make the automatic notification system with skript.
What is the error that obstructs this code from working?

Code:
options:
    prefix: <server>

on join:
    delete {Automatic Notice}
    if gamemode of player is adventure:
        every 6 seconds:
            if {Automatic Notice} is not set:
                set {Automatic Notice} to 1
                broadcast "{@prefix} Notice 1"
                stop
                if {Automatic Notice} is 1:
                    set {Automatic Notice} to 2
                    broadcast "{@prefix} Notice 2"
                    stop
                if {Automatic Notice} is 2:
                    set {Automatic Notice} to 3
                    broadcast "{@prefix} Notice 3"
                    stop
                if {Automatic Notice} is 3:
                    set {Automatic Notice} to 4
                    broadcast "{@prefix} Notice 4"
                    stop
                if {Automatic Notice} is 4:
                    set {Automatic Notice} to 5
                    broadcast "{@prefix}Notice 5"
                    stop
                if {Automatic Notice} is 5:
                    set {Automatic Notice} to 6
                    broadcast "{@prefix} Notice 6"
                    stop
            else:
                stop

When I reload, this error occured.

Code:
Can't understand this condition: 'every 6 seconds' (Automatic Notice.sk, line 6: every 6 seconds:')
"every 6 seconds" is not a condition, is a event.
 
Oh, I made a big mistake.
Then... how can I run the automatic note every six seconds when 'on join' is done and the gamemode is adventure?
Just move the every 6 seconds: event. Like this:
code_language.skript:
every 6 seconds:
    if {Automatic Notice} is not set:
        set {Automatic Notice} to 1
        broadcast "{@prefix} Notice"
        stop
    if {Automatic Notice} is 1:
        set {Automatic Notice} to 2
        broadcast "{@prefix} Notice 2"
        stop
    if {Automatic Notice} is 2:
        set {Automatic Notice} to 3
        broadcast "{@prefix} Notice 3"
        stop
    if {Automatic Notice} is 3:
        set {Automatic Notice} to 4
        broadcast "{@prefix} Notice 4"
        stop
    if {Automatic Notice} is 4:
        set {Automatic Notice} to 5
        broadcast "{@prefix}Notice 5"
        stop
    if {Automatic Notice} is 5:
        set {Automatic Notice} to 6
        broadcast "{@prefix} Notice 6"
        stop
 
It is definitely a clear code.
But what I want is that the statement is executed only when the gamemode is only adventure.
Your code is perfect, but it is all executable in all modes, isn't it?
'on join' and 'gamemode of player is adventure' must be an essential prerequisite for this syntax.
 
It is definitely a clear code.
But what I want is that the statement is executed only when the gamemode is only adventure.
Your code is perfect, but it is all executable in all modes, isn't it?
'on join' and 'gamemode of player is adventure' must be an essential prerequisite for this syntax.
Then add:
code_language.skript:
on join:
    player's gamemode is adventure:
        #the code
 
Oh.. I still stay same error...
Hey Skript! Why can't you understand "every 6 seconds"?!

Code:
on join:
    delete {Automatic Notice}
    player's gamemode is adventure:
        every 6 seconds:
            blah blah...
 
Oh.. I still stay same error...
Hey Skript! Why can't you understand "every 6 seconds"?!

Code:
on join:
    delete {Automatic Notice}
    player's gamemode is adventure:
        every 6 seconds:
            blah blah...
code_language.skript:
every 6 seconds:
    loop all players:
        loop-player's gamemode is adventure:
            if {Automatic Notice} is not set:
                set {Automatic Notice} to 1
                send "{@prefix} Notice 1" to loop-player
                stop
           if {Automatic Notice} is 1:
                set {Automatic Notice} to 2
                send "{@prefix} Notice 2" to loop-player
                stop
            if {Automatic Notice} is 2:
                set {Automatic Notice} to 3
                send "{@prefix} Notice 3" to loop-player
                stop
           if {Automatic Notice} is 3:
                set {Automatic Notice} to 4
                send "{@prefix} Notice 4" to loop-player
                stop
            if {Automatic Notice} is 4:
               set {Automatic Notice} to 5
               send "{@prefix} Notice 5" to loop-player
               stop
           if {Automatic Notice} is 5:
               set {Automatic Notice} to 6
               send "{@prefix} Notice 6" to loop-player
               stop
 
Umm... I don't know why.
The error phrase that every 6 seconds condition cannot be understood does not go away.
I knew that every 6 seconds: with your help is not a condition.
Then I need a solution.
When I join on, I want to delete {Automatic Notice} and run automatic notification every 6 seconds if player's gamemode is adventure.

I think you are the one who can help me. Can you help me complete my code?
 
Umm... I don't know why.
The error phrase that every 6 seconds condition cannot be understood does not go away.
I knew that every 6 seconds: with your help is not a condition.
Then I need a solution.
When I join on, I want to delete {Automatic Notice} and run automatic notification every 6 seconds if player's gamemode is adventure.

I think you are the one who can help me. Can you help me complete my code?
A question, do you want to do a type of skript about ads, right?
 
Last edited:
Yes, I want to finish this code and message(or send or broadcast, etc...) "text" to player when the player access in server.
Try this:
code_language.skript:
on skript start:
    set {ads.status} to true


every a second:
    if {ads.status} is not set:
        set {ads.status} to true
    if {ads.status} is true:
        set {ads.status} to false
        loop all players:
            loop-player's gamemode is adventure
            wait 2 minutes
            send "Ads 1." to loop-player
            wait 2 minutes
            send "Ads2." to loop-player
            wait 2 minutes
            send "Ads 3." to loop-player
            wait 2 minutes
            send "Ads 4." to loop-player
            wait 2 minutes
            send "Ads 5." to loop-player
            set {ads.status} to true
 
It means "give me that code".
Sorry guy! My English is not good Because I am Korean :emoji_slight_smile:
No problem, my English is not that good. I speak spanish.
So, what do you mean with "that" code? A code that has "player's gamemode is adventure" line? Or what?
 
I think "player's gamemode is adventure" is changing player's gamemode.
I'm asking you for a statement that indicates the condition, like an if statement.

And I reload that code, but I saw this error.

< There's no loop that matches 'loop-player' >
 
I think "player's gamemode is adventure" is change player's gamemode.
I'm asking you for a statement that indicates the condition, like an if statement.
Like this?
code_language.skript:
if player's gamemode is adventure:
if player's gamemode is creative:
if player's gamemode is survival:
if player's gamemode is spectator:

Or set it?
code_language.skript:
set player's gamemode to adventure
set player's gamemode to creative
set player's gamemode to survivival
set player's gamemode to spectator
 
Status
Not open for further replies.