WelcomeMessages

Moved

Total Downloads: 3,768 - First Release: Nov 19, 2016 - Last Update: Dec 25, 2017

5/5, 12 likes
  1. The plugin throws an error when a player disconnects before the timer for showing the welcome message expires.

    Code:
    11:33 [Stacktrace]   at BasePlayer.SendConsoleCommand (System.String command, System.Object[] obj) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Player.Message (.BasePlayer player, System.String message, System.String prefix, UInt64 userId, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Message (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Reply (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Reply (System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WelcomeMessages+<OnUserConnected>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0 
     
  2. Wulf

    Wulf Community Admin

    Could you post the full error please?
     
  3. Ankawi updated Welcome Messages with a new update entry:

    1.0.5

     
  4. When a player disconnects before the welcome message is sent:

    Code:
    (20:46:01) | Failed to run a 25.00 timer in 'WelcomeMessages v1.0.5' (NullReferenceException: Object reference not set to an instance of an object)
      at BasePlayer.SendConsoleCommand (System.String command, System.Object[] obj) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Player.Message (.BasePlayer player, System.String message, System.String prefix, UInt64 userId, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Message (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Reply (System.String message, System.String prefix, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Covalence.RustPlayer.Reply (System.String message) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.WelcomeMessages+<OnUserConnected>c__AnonStorey0.<>m__0 () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0
     
  5. I have not been able to re-create this error, are you sure that you're using the latest version?
     
  6. Hi yes. I believe it is when a player leaves the server before the wait timer expires.
     
  7. Seems to be working fine for me. I tested out the disconnecting before the message is sent but that doesn't seem to be the reason for the NRE error. What version of this plugin do you currently have? Type oxide.plugins in console to check.
     
  8. It is not creating the config file upon instal for me. Not sure why, have added to plugin folder twice. Doesn't auto create a config.
     
  9. Wulf

    Wulf Community Admin

    Sounds like the plugin isn't loaded the. Make sure you're installing it under the right location, which is oxide/plugins by default.
     
  10. hi when i edit the language file i get this error
    Code:
    Failed to initialize plugin 'WelcomeMessages v1.0.5' (JsonReaderException: Invalid character after parsing property name. Expected ':' but got: ,. Path 'Welcome', line 3, position 54.)
      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
     
  11. Wulf

    Wulf Community Admin

    That means is was not edited correctly.
     
  12. this is what i edited it to what am i doing wrong haha ?

    {
    "Welcome": "[#cyan]Welcome to 420Zone {0}![/#]",
    "[#cyan]Type /town to go to the shop/SAFE Zone[/#]",
    \n"[#cyan]Type /sethome "homename" to set your home[/#]",
    \n"[#cyan]Type /delhome "homename" to delete a home[/#]",
    \n"[#cyan]Type /home "HomeName" to tp home[/#]",
    \n"[#cyan]Type /tpr "PlayerName" to tp to a friend[/#]!,
    \n"[#cyan]Type /tpa to accept an tp invite[/#]",
    \n"[#cyan]Type /tpc to cancel a tp [/#]",
    \n"[#cyan]Type /remove to remove a wall etc (30s)[/#]",
    \n"[#cyan]Type /kit to get your free starter kit[/#]",
    \n"[#cyan]Please No Door Camping or griefing[/#]",
    \n"[#cyan]Happy Playing[/#]"
    }
     
  13. Wulf

    Wulf Community Admin

    You have a ", after each line, that's now how a single JSON entry works. They all need to be inside that first " like:
    Code:
    {
      "Welcome": "[#cyan]Welcome to 420Zone {0}![/#]
       [#cyan]Type /town to go to the shop/SAFE Zone[/#]
       \n[#cyan]Type /sethome "homename" to set your home[/#]
       \n[#cyan]Type /delhome "homename" to delete a home[/#]
       \n[#cyan]Type /home "HomeName" to tp home[/#]
       \n[#cyan]Type /tpr "PlayerName" to tp to a friend[/#]
       \n[#cyan]Type /tpa to accept an tp invite[/#]
       \n[#cyan]Type /tpc to cancel a tp [/#]
       \n[#cyan]Type /remove to remove a wall etc (30s)[/#]
       \n[#cyan]Type /kit to get your free starter kit[/#]
       \n[#cyan]Please No Door Camping or griefing[/#]
       \n[#cyan]Happy Playing[/#]"
    }
     
  14. getting this when i reload the plugin ....


    > oxide.reload WelcomeMessages
    Unloaded plugin WelcomeMessages v1.0.5 by Ankawi
    Failed to initialize plugin 'WelcomeMessages v1.0.5' (JsonReaderException: After parsing a value an unexpected character was encountered: h. Path 'Welcome', line 4, position 27.)
    at Newtonsoft.Json.JsonTextReader.ParsePostValue () [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
    Unloaded plugin WelcomeMessages v1.0.5 by Ankawi
    Previous version of plugin failed to load: WelcomeMessages
     
  15. Wulf

    Wulf Community Admin

    Use www.jsonlint.com to see where you're going wrong with it.
     
  16. went to that site it has given me this...
    Error: Parse error on line 2:
    { "Welcome": "[#cyan]Welcome to 4
    -------------^
    Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'

    thankyou for the help so far
     
  17. Wulf

    Wulf Community Admin

    Code:
    {
        "Welcome": "[#cyan]Welcome to 420Zone {0}![/#][#cyan]Type /town to go to the shop/SAFE Zone[/#]\n[#cyan]Type /sethome \"homename\" to set your home[/#]\n[#cyan]Type /delhome \"homename\" to delete a home[/#]\n[#cyan]Type /home \"HomeName\" to tp home[/#]\n[#cyan]Type /tpr \"PlayerName\" to tp to a friend[/#]\n[#cyan]Type /tpa to accept an tp invite[/#]\n[#cyan]Type /tpc to cancel a tp [/#]\n[#cyan]Type /remove to remove a wall etc (30s)[/#]\n[#cyan]Type /kit to get your free starter kit[/#]\n[#cyan]Please No Door Camping or griefing[/#]\n[#cyan]Happy Playing[/#]"
    }
     
  18. thankyou :) all working now
     
  19. It keeps saying just 1 message? can you help me out ?
    {
    "Welcome": "[#cyan]Welcome to the server {0}![/#]
    \n[#yellow]Please abide the server's rules[/#]"
    }
     
  20. Wulf

    Wulf Community Admin

    It only has one message.