its my codeCode:// 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 }); } } }
what`s wrong? i got an error when i put in this plugin at my server
PM [Error] Plugin filename is incorrect: welcomehelp.cs
Errors in my C# plugin
Discussion in 'Rust Development' started by PEPE 2, May 12, 2015.
-
The filename must match the name of the class.
-
[Error] Failed to load plugin 'welcomekit' (no source found) -
public class PluginName : RustPlugin => public class welcomekit : RustPlugin
-
Your next error will be rust.SendChatMessage({ player, message });
-
-
or you can do player.ChatMessage(message) -
Wulf Community Admin
-
-
Wulf Community Admin
-
[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 -
Last edited by a moderator: May 13, 2015
-
-
Wulf Community Admin
-
[Error] Error while compiling WelcomeHelp.cs(11,4): error CS0103
: The name `rust' does not exist in the current context -
You can't use rust.SendChatCommand without importing the correct namespace, that being said, all those rust._____ methods are helpers for Py, Lua and JS plugins. For C# there is a different set of helpers available -> https://github.com/OxideMod/Oxide/blob/master/Oxide.Ext.Rust/RustPlugin.cs#L146