[BUG] RequiredField attribute causes condition to disable when it shouldn't

Forums 💬 NodeCanvas ⚙️ Support [BUG] RequiredField attribute causes condition to disable when it shouldn't

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #16395
    erdoal
    Participant

      When I have [RequiredField] on a BBParameter, and set it to a Blackboard variable that currently resolves to null, this warning appears:

      [attachment file=”qweqweqqwe.png”]

      Turns out, I can’t ignore this warning, since on startup an error show up and says that required field is not set, and the whole transition gets permanently disabled (but confusingly, the moving red dots still telegraph that it’s being evaluated).

      #16398
      Gavalakis
      Keymaster

        Hey,

        Do you actually set the variable named “Target” in runtime so that it is not NULL before the execution of the condition?

        #16397
        erdoal
        Participant

          Hi, no, it isn’t set immediately and stays null sometimes. Now it seems I’m using [RequiredField] wrong, for some reason I expected it only to check if the field is linked to something at all, and only throw an error if it’s clearly “NONE”. Sorry.

          #16396
          Gavalakis
          Keymaster

            Hello again,

            For your information, the [RequiredField] attribute throws an error if the final resolved parameter value is NULL (or string empty in case of string), regardless of whether or not the parameter is linked to a variable or not linked to variable. “NONE” is also always resulting to a value of NULL as well. Please let me know if this is still an issue for you.

            Thanks!

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.