1. upload_2018-5-6_18-21-27.png

    This is the current plugin im making to kill sleepers when they disconnect (Please tell me if im doing it wrong because its my first time making a plugin) and i get this error when loading it into the server -


    Error while compiling: Sleeper.cs(28,246): error CS1525: Unexpected symbol `end-of-file'
     
  2. Add } at end of file
     
  3. What do you mean though, like have a { on the bottom line
    [DOUBLEPOST=1525595630][/DOUBLEPOST]or like in the name?
     
    Last edited by a moderator: May 6, 2018
  4. you have not close your class Sleeper
     
  5. How would i do that
     
  6. 1. missing semicolon at the end of 14 line.
    2. replace { with } on the line 24.
    3. insert } after the 25 line.
     
  7. [​IMG]

    Code:
     namespace Oxide.Plugins{
        [Info ("Dormeur", "Malédiction", 01)]
        [Description ("Tue les dormeurs"]]
        
        classe Sleeper: RustPlugin
        {
            chaîne PermGroup;
            
            chaîne publique PermGroup {get => PermGroup; set => PermGroup = valeur; }        override protégé override LoadDefaultCOnfig ()
            {
                Config ["Permissions Group"] = PermGroup = GetConfig ("Groupe d'autorisations", "Kill.Sleeper");
                SaveConfig ();
            }        void OnPlayerDisconnected (lecteur BasePlayer)
            {
                if (HasPlayerPermission (joueur, "kill.Sleeper"))
                {
                    player.Die ();
                    revenir;
                }
            }
        }
    }
     
  8. Thank you guys so very much, really appreciate it

    Im still getting another error after editing it from what u guys said

    Error while compiling: Sleeper.cs(13,60): error CS1043: Invalid accessor body `=>', expecting `;' or `{'

    upload_2018-5-6_20-32-43.png
     
    Last edited by a moderator: May 6, 2018
  9. Code:
    string permGroup;
    public string PermGroup { get { return permGroup; } set { permGroup = value; } };
    ?
     
    Last edited by a moderator: May 6, 2018
  10. That's being rejected because it's a newer C# feature. You can use what's above, but there's no advantage to declaring that as a property over a field, but if you're set on it, you don't need a backing field, at least declared explicitly.
     
  11. Thanks guys, works now :)
     
  12. What a tolerant community here!