1. @Nogrod lang.RegisterMessages() won't accept a Python's Dictionary to register messages
    Code:
    RuntimeError: Failed to call Init (ArgumentTypeException: expected Dictionary[str, str], got dict)
    Code:
    class test():    def __init__(self, arg):
          
            self.Title = 'Test'
            self.Version = V(0, 0, 0)
            self.Author = 'SkinN'    def LoadVariables(self):        lang.RegisterMessages(
                {
                    "Message One": "This is message one!",
                    "Message Two": "This is message two!"
                },
                self.Plugin
            );    def Init(self):        self.LoadVariables()
    
     
    Last edited by a moderator: Mar 3, 2016
  2. Wulf

    Wulf Community Admin

    Code:
    from System import String
    from System.Collections.Generic import Dictionary
    lang.RegisterMessages(Dictionary[str,str]({"pykey" : "pymessage"}),self.Plugin)
     
  3. Marvelous ! Thank you :)
     
  4. Wulf

    Wulf Community Admin

    Thank @Nogrod, he passed this to me the other day. ;)
     
  5. No offence but I did found odd being you to provide this. :p
     
  6. Wulf

    Wulf Community Admin

    Yeah... not a Python guy. :p