Validates if with string for number

49 Views Asked by At

// Hey, I have a question about a validation within an action.bxb, where I want bixby to replan with an "if (a string)" specifies for a number.

// But when I try to put the condition, it gives the following error: WARN 'x === six' is non-boolean (String). // I know it can be something very simple (maybe), but I appreciate if you tell me how to do this "string for number" process.

validate {
       if ('x === six') {
          replan {
            intent {
              goal: HorizontalDirectionConcept
              value:HorizontalDirectionConcept (6)
            }
          }
        }
    }
1

There are 1 best solutions below

1
On

I think I already managed, I put 'string "in the relatives and left (x ==' string ')

validate {
       if (x === 'six') {
          replan {
            intent {
              goal: HorizontalDirectionConcept
              value:HorizontalDirectionConcept (6)
            }
          }
        }
    }