AutoBroadcast

Moved

Total Downloads: 8,941 - First Release: Oct 26, 2014 - Last Update: Feb 27, 2017

5/5, 20 likes
  1. Wulf

    Wulf Community Admin

    You modified it for en? Are you sure the changes are still there?
     
  2. Yes, look here
    [​IMG]
     
  3. Hi:

    This currently appears broken after the last update, here is what we are seeing.


    (15:41:00) | Unloaded plugin AutoBroadcast v1.0.8 by Wulf/lukespragg

    (15:41:00) | Failed to call hook 'OnServerInitialized' on plugin 'AutoBroadcast v1.0.8' (JsonReaderException: Invalid character after parsing property name. Expected ':' but got: }. Path 'Homes', line 7, position 2.)

    at Newtonsoft.Json.JsonTextReader.ParseProperty () [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.JsonTextReader.ParseObject () [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.JsonTextReader.Read () [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateDictionary (IDictionary dictionary, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonDictionaryContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0

    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, Boolean checkAdditionalContent) [0x00000] in <filename unknown>:0

    Any help/suggestions on how to get it working again would be appriciated.
    Thank you
     
  4. Wulf

    Wulf Community Admin

    Your JSON is invalid, verify it against www.jsonlint.com.
     
  5. Hi Wulf:

    Thank you for your help, that site www.jsonlint.com is great.

    I did want to know too that this was my error, I missed a ' : ' when I added a line just after the Rust Update completed. My apologies, next error I will double check my code before posting.

    Thanks again for your help and all that you do for the community.

    Wez
     
  6. i in the .jason file i change the messages to say this

    {
    "ExampleMessage": "Join the server discord ",
    "AnotherExample": "Ask Admins for help"
    }
    but it dose not change it
     
  7. Wulf

    Wulf Community Admin

    Did you reload the plugin? Did you check your oxide/logs?
     
  8. so is this right how it is set up

    {
    "Broadcast Interval (Seconds)": 300,
    "Randomize Messages (true/false)": false
    }

    {
    "ExampleMessage": "Join the server Discord",
    "AnotherExample": "Ask the Admins for help"
    }
     
  9. no, look at the plugin overview. it explains it all
     
  10. yea ok it says a new message can be put in but it does not explain how it is set out. i added a new message
    "ExampleMessage": "Join the server Discord",
    "AnotherExample": "Ask the Admins for help"
    }
     
  11. ok i have looked at past comments and edited someones comment

    {
    "Broadcast Interval (Seconds)": 300,
    "Randomize Messages (true/false)": false
    }
    {
    "Build": "Build a home before exploring monuments and get some food!",
    "commands": "/home|/tpr|/tpa|/tpb|/clan][/kit][/sethome]",
    "Discord": "Discord",
    "Meteor shower": "Starts every 30 miss (don't forget the meteors drop loot)",
    "Staff on the server": "[OWNER] TrimT@x, cobs, fragle0132, ChaoticVibe, KingShadowMurloc, bulldog2522, Dr.Aromatic, 6 meter kuk"
    }
    is their any mistakes on this?
     
  12. Wulf

    Wulf Community Admin

    The messages do not go in the config file and the config doesn’t go in the lang files.
     
  13. so where do i paste it because the .json file is in the config in plugins
     
  14. Hi TrimT@x:

    Are you putting your messages in the Oxide/Lang/En/Autobroadcast.json file?

    your editing looks correct but will not work if it is in the config directory and would need to be in the En directory.
     
  15. hi thank you for your help (i ussualy edit stuff in the config files and they work) thank you for telling me this it
    btw do i have to add this
    {
    "Broadcast Interval (Seconds)": 300,
    "Randomize Messages (true/false)": false
    }
    or will it already work without that
     
  16. Wulf

    Wulf Community Admin

    The default files are generated automatically and their locations are mentioned in the Overview.
     
  17. Getting this:

    Code:
    Failed to run a 300.00 timer in 'AutoBroadcast v1.0.8' (FormatException: Input string was not in a correct format.) at System.String.ParseFormatSpecifier (System.String str, System.Int32& ptr, System.Int32& n, System.Int32& width, System.Boolean& left_align, System.String& format) [0x00000] in :0
      at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in :0
      at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in :0
      at System.String.Format (System.String format, System.Object[] args) [0x00000] in :0
      at Oxide.Plugins.AutoBroadcast.Lang (System.String key, System.String id, System.Object[] args) [0x00000] in :0
      at Oxide.Plugins.AutoBroadcast.m__0 () [0x00000] in :0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in :0 
    with this:
    Code:
    {
      "Broadcast Interval (Seconds)": 300,
      "Randomize Messages (true/false)": false
    }
    and this:
    Code:
    {
        "Message1":"Be respectful with eachother.",
        "Message2":"You are playing on: <color=#ffa500>{server.hostname}</color>",
        "Message3":"There are <color=#ffa500>{players.active}</color>/<color=#c0c0c0>{server.maxplayers}</color> players playing in the server, and <color=#c0c0c0>{players.sleepers}</color> sleepers.",
        "Message4":"Check <color=#01c9df>commands</color> with <color=#ffa500>/help</color> command.",
        "Message5":"Use /kit for starter, daily and weekly gear!",
        "Message6":"Need Admin assistance? Use <color=#01c9df>/ticket</color>!",
        "Message7":"Use <yellow>/vote<end> to get some rewards!",
        "Message8":"Use <color=#ff0066>/vip</color> for information about the VIP status!",
        "Message9":"Use <color=#ff0066>/viptrial</color> for a free 2 day trial of our VIP status!"
    }
     
  18. Wulf

    Wulf Community Admin

    You cannot have {players.active} and {server.maxplayers} as it thinks you are trying to replace those with something, which won't work.