Advanced Autobroadcaster

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

Simon942

Member
Sep 22, 2018
46
1
0
21
Hi there

I have a issue with the skript: https://pastebin.com/veNNM3Es
The issue is that it sends the same message, and sometime sending two messages at the same time.

My skript is advanced made in that way it should only broadcast then there are some players online (For clean logs) and not using commands (For clean console)

I have tried to contact a friend but we can't resolve it by our self.

Best regards Simon
 
code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e
every 1 minute:
    if number of all players > 1:
        broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
    else:
        if number of all players = 1:
            broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"

Your problem of 2 messages having been sent at the same time is due to line 8.

code_language.skript:
        if {BC.Starter} is 1 or over:
So, it checks if it is 1 OR over. If it is 1 then it will execute both broadcasts due to line 13-15 because it checks again if it is just 1
 
Last edited:
code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e
every 1 minute:
    if number of all players > 1:
        broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
    else:
        if number of all players = 1:
            broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"

Your problem of 2 messages having been sent at the same time is due to line 8.

code_language.skript:
        if {BC.Starter} is 1 or over:
So, it checks if it is 1 OR over. If it is 1 then it will execute both broadcasts due to line 13-15 because it checks again if it is just 1

Hi again

Thank you for the answear.
Now Skript tells me that there are some Empty configurations.

Code:
code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e

every 1 minute:
    if number of all players = 0:
    stop
    if {_1} is 1:
        set {_2} to 2
        broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
        clear {_1}
    else:
        if {_2} is 1:
            set {_1} to 1
            broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"
            clear {_1}
 
Hi again

Thank you for the answear.
Now Skript tells me that there are some Empty configurations.

Code:
code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e

every 1 minute:
    if number of all players = 0:
    stop
    if {_1} is 1:
        set {_2} to 2
        broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
        clear {_1}
    else:
        if {_2} is 1:
            set {_1} to 1
            broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"
            clear {_1}

code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e
every 1 minute:
    if number of all players = 0:
        stop
        if {_1} is 1:
            set {_2} to 2
            broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
            clear {_1}
        else:
            if {_2} is 1:
                set {_1} to 1
                broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"
                clear {_1}
 
code_language.skript:
options:
     prefix: &6&l[&b&lLobby&6&l]&r &e
every 1 minute:
    if number of all players = 0:
        stop
        if {_1} is 1:
            set {_2} to 2
            broadcast "{@prefix} Besøg vores hjemmeside på: &f&ohttps://www.Siecraft.dk/"
            clear {_1}
        else:
            if {_2} is 1:
                set {_1} to 1
                broadcast "{@prefix} Besøg vores Discord på: &f&ohttp://Discord.Siecraft.dk/"
                clear {_1}
Sorry but i can't see any difference.

Best regards Simon
[doublepost=1545893987,1545863589][/doublepost]Hi there¨

Sorry for the last answear. Now i have tested the code you sent, and it worked fine :emoji_slight_smile:
Thanks alot.

Best regards Simon
 
Sorry but i can't see any difference.

Best regards Simon
[doublepost=1545893987,1545863589][/doublepost]Hi there¨

Sorry for the last answear. Now i have tested the code you sent, and it worked fine :emoji_slight_smile:
Thanks alot.

Best regards Simon
If so please set the thread to solved or mark my answer as best answer
 
Hi there

Hmm it still seems to be a issue:
It posts the first broadcast over and over again. Instead of posting the first broadcast and after that the other one.

best regards Simon
 
Hi there

Hmm it still seems to be a issue:
It posts the first broadcast over and over again. Instead of posting the first broadcast and after that the other one.

best regards Simon
Well that’s because of line 8 and 12. {_2} has to be the same value
 
code_language.skript:
every minute:
    if number of all players is more than 0:
        if {_1} is not set:
            broadcast "Text1"
            set {_1} to true
        else:
            broadcast "Text2"
            delete {_1}
 
code_language.skript:
every minute:
    if number of all players is more than 0:
        if {_1} is not set:
            broadcast "Text1"
            set {_1} to true
        else:
            broadcast "Text2"
            delete {_1}
Hi there
Now it just repeats "Text1" the other message "Text2" is never shown.
 
Status
Not open for further replies.