• 0

    posted a message on Galaxy++ attribute problem

    I can with GUI. With galaxy++ I get this error: 0:00:08.13 Trigger Error in 'DT_trigM': Could not get 'text' from parameter in 'UIDisplayMessage' (value: 65535)

    I don't really know why. I basically copy/pasted the GUI line over to galaxy++

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy++ attribute problem

    Yes, that is what that display message is for outside the if statement. The trigger executes, but the if statement check doesn't go through like it does in the GUI version.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Galaxy++ attribute problem

    I've been playing around with Beier's editor and I've run into a problem. I made a simple trigger in GUI to test/determine a player attribute. Then I wrote it in galaxy++ and it no longer works.

    GUI version:

    bool gt_UntitledTrigger001_Func (bool testConds, bool runActions) {
        string auto934F842A_val;
    
        // Variable Declarations
        string lv_untitledVariable001;
    
        // Variable Initialization
        lv_untitledVariable001 = null;
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        lv_untitledVariable001 = GameAttributePlayerValue("1", 1);
        auto934F842A_val = lv_untitledVariable001;
        if (auto934F842A_val == "0001") {
            UIDisplayMessage(PlayerGroupAll(), c_messageAreaSubtitle, StringExternal("Param/Value/23C623AD"));
        }
        else {
        }
        return true;
    }
    

    Galaxy++ version: I have some unused variables because the code was originally more complicated, but because it wasn't working I simplified it.

    namespace DT
    string[13] team; //player 1 starts at 1 instead of 0
    
    Trigger trig
    {
        events
        {
            TriggerAddEventKeyPressed(trig,c_playerAny,c_keyN,true,c_keyModifierStateIgnore,c_keyModifierStateIgnore,c_keyModifierStateIgnore);
        }
        
        actions
        {
            UIDisplayMessage(PlayerGroupAll(),c_messageAreaChat,(text) EventPlayer() );
            if(GameAttributePlayerValue("1", 1) == "0001")
            {
                UIDisplayMessage(PlayerGroupAll(),c_messageAreaChat, (text)"Attribute 1 detected");       
            }
        }
    }
    

    The galaxy++ trigger has an additional display message to make sure the trigger fires. It does, but I can't get the "Attribute 1 detected" message to show up in the galaxy++ version. The GUI version works just fine. Unless I'm missing something these two triggers are exactly the same side-by-side with the galaxy++ lacking some useless variables. Thoughts anyone?

    Posted in: Galaxy Scripting
  • To post a comment, please or register a new account.