1. Hello,

    I've been developing a mod and I have an issue while debugging it. I have a test server I rented on which I haver FTP access and I just upload the mod to the plugins folder and the server auto-reload it. I suppose that's standard behavior?

    When there is a compile error in the plugin, there will be a message I can see on RCON that dumps the exception and so on, standard stuff. So I change my code up, send it again and half the time it will reload fine, and the other half I'll get a message that says the plugin is already reloading.. and it just stays like that forever. I can retry later it will always fail with the same message and I'm forced to reboot the whole server.

    Is this normal?

    Now, this leads to another question. I'm just writing this C# straight into Notepad++ hardcore style and not compiling. Can you successfully compile a plugin on your local computer using Visual Studio? I tried at first and I was getting references issues but then I downloaded the server files and well all I need should be in there. Is it possible or is there something that would prevent compiling a plugin in VS?

    Having access to a proper editor and tools would be real nice and well I wouldn't have any issues causing the bug I first mentioned if I could compile before to make sure it's ok.

    Any help would be appreciated!
     
  2. I also had this when I started out using Oxide. You can create your Plugin [mod] within Visual Studio and compile it successfully. You just have to make sure that you have all the references that it requires to work.

    References I normally use for Rust is:
    assembly-CSharp.dll
    Oxide.Core.dll
    Oxide.Ext.CSharp.dll
    Oxide.Game.Rust.dll
    UnityEngine.dll
     
  3. Thanks mate, I'll try that.
     
  4. Wulf

    Wulf Community Admin

    If you see "Already reloading" messages, it's generally because there are errors/exceptions in that plugin that it can't display. You can check the compiler logs under oxide/logs for details.
     
  5. But once the errors are fixed it just keeps saying that until i reboot. Then that same code runs just fine after reboot
    [DOUBLEPOST=1434389696,1434211592][/DOUBLEPOST]So I installed the latest Visual Studio, added the mentioned references and it's almost working but not quite. I'm getting errors on these:

    void Loaded() => LoadConfigValues();
    void Unloaded() => Rollback();

    It's bugging on the => saying ; is expected.. It's like not recognizing this syntax. I have Linq referenced and in my "using" statements. This is code that compiles and works fine on my server btw.

    Also, calls to Puts give me an error like it's not referenced...

    Also, usage of $ before string literals for formatting give an error: Unexpected character '$'

    This is also failing:
    player?.SendConsoleCommand("chat.add", -1, message, 1.0);

    Saying : is expected...

    I'm not sure what to make of all of this. Feels like it's missing language features or some kind of extension. Again, this code compiles and runs perfectly fine on the server.

    Any ideas?
     
  6. Wulf

    Wulf Community Admin

    You don't have Visual Studio 2015 installed. The majority of the errors you are seeing are from your version of VS being unable to handle newer C# methods and functions.
     
  7. Damn your right, looks like that "latest version" link on MS got me 2013...