What am I doing wrong?
line 223:Code:04 ForServer - Failed to compile: ForServer.cs(223,35): error CS0119: Expression denotes a `method group', where a `variable', `value' or `type' was expectedCode:[ChatCommand("stop")] void stop(BasePlayer player, string command, string[] args) { string pass = Config.Get<string>("Password"); if (!HasPermission(player.UserIDString, perm)) { SendReply(player, Lang("Opravneni", player.UserIDString, Name)); return; } if (args.Length == 1) { if (args[0] == pass) { ConsoleSystem.Run.Server.Normal("stop"); } else { SendReply(player, Lang("BadPass", player.UserIDString, Name)); } } else { SendReply(player, Lang("BadPass", player.UserIDString, Name)); } }
Solved Error CS0119 in plugin (invalid code)
Discussion in 'Rust Development' started by Polarni, Dec 25, 2017.
-
Try
Code:ConsoleSystem.Run(ConsoleSystem.Option.Unrestricted, "stop");
-
-
Wulf Community Admin