1. Code:
    // Reference: Oxide.Ext.Rustnamespace Oxide.Plugins
    {
        [Info("Welcomehelp", "PEPE", "0.1.0", ResourceId = 681)]
        public class PluginName : RustPlugin
        {
          void OnPlayerConnected(Network.Message packet)
            {
                var message = "HELLO~: <color=lime> /event_join";
                rust.SendChatMessage({ player, message });
            }
        }
    }
    its my code
    what`s wrong? i got an error when i put in this plugin at my server

    PM [Error] Plugin filename is incorrect: welcomehelp.cs
     
    Last edited by a moderator: May 12, 2015
  2. The filename must match the name of the class.
     
  3. then i got a new error

    [Error] Failed to load plugin 'welcomekit' (no source found)
     
  4. public class PluginName : RustPlugin => public class welcomekit : RustPlugin
     
  5. Your next error will be rust.SendChatMessage({ player, message });
     
  6. => rust.SendChatMessage( player, message );
     
  7. it`s still not working :(
     
    Last edited by a moderator: May 12, 2015
  8. rust.SendChatMessage(player, message, "0");
    or you can do player.ChatMessage(message)
     
  9. Wulf

    Wulf Community Admin

    The userid at the end is optional, and it'd be redundant to specify 0 when the default is 0. The latter would be the better option, as the rust library functions are meant more for Lua, Js, and Py plugins. C# plugins can call most everything directly.
     
  10. Oh? Back when I was playing with that one I would get an error if I didn't specify the userid. But that was a while ago :p
     
  11. Wulf

    Wulf Community Admin

  12. Still got a terrible error
    [Error] Plugin filename is incorrect: welcomehelp.cs

    Here is my code
    Code:
    // Reference: Oxide.Ext.Rustnamespace Oxide.Plugins
    {
        [Info("Welcomehelp", "PEPE", "0.1.0", ResourceId = 681)]
        public class welcomehelp : RustPlugin
        {
          void OnPlayerConnected(Network.Message packet)
            {
                var message = "TEST: <color=lime> /event_join";
                rust.SendChatMessage(player, message, "0");
            }
        }
    }
     
    Last edited by a moderator: May 13, 2015
  13. is your filename Welcomehelp or welcomehelp. your filename needs to be the same as the plugin name in the code. It is case sensitive.
     
    Last edited by a moderator: May 13, 2015
  14. its same "welcomehelp.cs"
     
  15. Wulf

    Wulf Community Admin

    Change your filename to WelcomeHelp.cs and the public class to WelcomeHelp.
     
  16. i got a new error

    [Error] Error while compiling WelcomeHelp.cs(11,4): error CS0103
    : The name `rust' does not exist in the current context