1. I recently decided i wanted to make plugins.
    I was reading here: Rust
    And using some of the c# examples, but i get an error

    EnqueueCompilation called for an empty compilation

    Not sure what this is about but im new to all this so i dont know.
     
  2. Wulf

    Wulf Community Admin

    Please provide your full latest oxide/logs.
     
  3. You want to see the error
    [DOUBLEPOST=1459789720][/DOUBLEPOST]All is says is
    EnqueueCompilation called for an empty compilation
     
  4. Calytic

    Calytic Community Admin Community Mod

    Nope, we can't say much with that error alone. Like wulf mentioned please upload your log files from oxide/logs (latest files only)
     
  5. All i have in my logs is notifier connections
     
  6. Calytic

    Calytic Community Admin Community Mod

    Alright, can you provide the plugin code you are using for your example?
     
  7. Code:
    using System.Collections.Generic;
    using System;
    using System.Reflection;
    using System.Data;
    using UnityEngine;
    using Oxide.Core;namespace Oxide.Plugins
    {
        [Info("EpicPlugin", "Unknown", "1.0.0")]
        [Description("A basic chat command.")]    class EpicPlugin : RustPlugin
        {
          
            [ConsoleCommand("testing")]
            void TestCommand(BasePlayer player, string command, string[] args)
            {
                SendReply(player, "Test successful!");
            }
        }
    }
     
  8. Wulf

    Wulf Community Admin

    What filename are you using for your plugin @boop 2?
     
  9. test.cs
     
  10. Wulf

    Wulf Community Admin

    Your main class is EpicPlugin, so you'd need to name the file EpicPlugin.cs or change both to match such as Test.
     
  11. OMG, hahahah. Im a idiot, sorry!
     
  12. Im so sorry i should of asked you that when you asked me
     
  13. Don't know if this thread is dead or not, but I'm really interested in making plugins for rust as well. However, I'm just beginning to learn Python. I saw python is indeed supported for Rust game. Could any of you wizard developers point me in a good direction for learning how to program for this game? Any resources, books, etc would be much appreciated.
     
  14. I recommend looking around in the internet for tutorials. For example where I often learn programming languages:
    Click -> Python tutorial

    I suggest first learning ad much as possible of the language itself and experimening with simple stuff like console applications (not sure how you'd do such in python). Later on move to plugin making and try to learn about Oxide's API and the game you want to support.
     
  15. Was wondering if you could help me figure something out LaserHydra. After sifting through other Python plugins and their code I was able to figure out how to broadcast text based on certain hooks:

    rust_module.JPG

    I simply copied and pasted random modules to import based on what other Python codes looked like, because I have no idea where to find these modules or what to import based on what I need. I know its somewhere in the DLL, but my problem is I have no idea how to navigate the DLL, or WHICH DLL to look at for primary definitions etc.
    I am currently importing the following:

    import BasePlayer
    import UnityEngine
    from System import Action
    import re
    Obviously ONE of them is allowing the rust.SendChatMessage function to work... and its obviously deriving from the "rust" module/library. Now when I open up the Assembly-CSharp.dll in a decompiler, I see the following:

    justdecompile.JPG
    So I figured, ok "rust.SendChatMessage( )" must be in the Rust module/class. (My assumption is that in this .dll list, these are all the various "Classes" or "Objects"; please tell me if I'm wrong). I open up the Rust module/class and don't see anything referring to "SendChatMessage" definition/function, I only see the following:

    rust.JPG

    Basically, I'm wondering if someone can help me understand where to look for functions in Rusts and Oxides .dll's and where to look for the functions etc. Am I looking in the incorrect DLL? Is the 'rust' part of "rust.SendChatMessage" referring to a class within a module or a module within a DLL?
     
  16. Wulf

    Wulf Community Admin

    The "rust" library helper is from Oxide, not the game itself. See Oxide/Rust.cs at develop · OxideMod/Oxide · GitHub for all of the library helpers.
     
  17. Holy shit, ok now I understand what that file is. Sorry Wulf, I know you've repeated yourself at least a dozen times, I just couldn't figure out for the life of me where I was calling things from. Ok so that Rust.cs file comes with the Oxide .zip file you extract into your server, and I'm calling from that. Understood :)
    Thanks once again Wulf.
     
  18. Wulf

    Wulf Community Admin

    Yup, those helpers are there for non-C# languages, as they can't handle some things like C# can.
     
  19. Last question (for now haha), do you guys have a quicker method for testing your code? As of now I'm writing the code, restarting server, checking log errors, stop server, fixing code, rinse and repeat. I mean, I'm sure thats the only way to do it, but just curious. Thanks again.
     
  20. Wulf

    Wulf Community Admin

    Plugins are reloaded automatically by the server, just keep it running while you develop the plugin. You can reference the server's console to see any errors it may have.