1. Hi,
    I'm trying to run a very simply Python script, but it's saying that's it's missing he 'Main Class'.
    Code:
    [Error] Failed to load plugin sayHi2: (Exception: Plugin is missing main class)
    I used @Wulf's Python example, with a few changes, but still errors out. (http://oxidemod.org/threads/javascript-python-and-luajit-oh-my.6451/)

    Just wondering if I should be naming my 'Main Class' anything specific.

    Code:
    def Init(self):
            command.AddChatCommand(cmd, self.Plugin, 'sayHi_CMD')
    def playerlist_CMD(self, args):
            print ("Hi")
            obj = Rust.DamageTypeList()
            print (obj.Total())
    Probably pretty easy to fix, but I can't get my head around it.
    Apologise for being such a noob. ;(

    Also, if there's a better section to post questions like this, please let me know, I feel like I'm spamming. ;l

    Thanks,
    Amos.
     
  2. Wulf

    Wulf Community Admin

    I believe the Main Class has to be the same as your plugin's filename. In my example, Test.py is the full filename, so the class would be Test and would wrap your whole plugin. The example
    Code:
    class Test:
     
  3. Excellent! That worked.