• 0

    posted a message on Galaxy++ editor

    Hi and thanks for making galaxy and I must say that I really like it. So good job.

    But I am having some issues with classes. If I make the class global I dont get auto-completion on the members in the class.

    And I cant do "myClass.Print();" as I get a "The left side of the .must be of type struct or class" error. If I change it too "myClass->Print();" it works fine. Its the same thing inside the class "#this.myValue = 2;" dont work but "#this->myValue = 2;" works fine. So are "." no longer supported?

    The following script works fine and I get auto-completion on the members in the class in the InitMap() function.

    #class Class
    {
        int myValue;
        
        Class()
        {
            #this->myValue = 2;
        }
        
        void Print()
        {
            string printText;
            printText = "Class value == " + IntToString( #this->myValue);
            UIDisplayMessage( PlayerGroupAll(), c_messageAreaDebug, StringToText( printText ) );
        }
    }
    
    void InitMap()
    {
        Class* myClass;	
        myClass = #new Class();
        myClass->Print();
    }
    

    But as I want to use the class inside other functions too I tried to move out the Class* myClass; part. Like this:

    Class* myClass;
    void InitMap()
    {
        myClass = #new Class();
        myClass->Print();
    }
    

    This work fine and I can use the class in my other functions but I know longer get any auto-completion or list of the members in the class.

    Posted in: Third Party Tools
  • To post a comment, please or register a new account.