Sign InSign Up

Rocketbot Forum

Rocketbot Forum Logo Rocketbot Forum Logo

Rocketbot Forum Navigation

  • Academy Rocketbot
  • Tutoriales
  • Documentación
Search
Ask A Question

Mobile menu

Close
  • Home
  • Popular
  • Categorías
  • Tags
  • Preguntas
    • Nuevas Preguntas
    • Más votadas
    • Más visitadas
    • Más respondidas
  • Academy Rocketbot
  • Tutoriales
  • Documentación
Home/ Questions/Q 3043
Next
In Process

Rocketbot Forum Latest Questions

Anonymous
  • 0
  • 0
Anonymous
Asked: Junio 2, 20212021-06-02T19:22:39+00:00 2021-06-02T19:22:39+00:00In: Comandos

If con String

  • 0
  • 0

Buenas tardes,

Tengo una duda, estoy haciendo este if para que continue si mi variable es igual al texto que pongo, pero siempre me sale error en la sintaxis, Cuál sería la forma correcta?

Agradezco su ayuda.

ifstring
2
  • 2 2 Answers
  • 9k Views
  • 0 Followers
  • 0
Share
  • Facebook

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. Bender
      Bender
      2021-06-02T20:38:34+00:00Added an answer on Junio 2, 2021 at 8:38 pm

      Hola Anonymous

      Tu variable debe ir entre comillas dobles también, esto para indicar que es un string

      "{texto}" == "SEGUIR"

        • 1
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. VsantaC
      VsantaC
      2021-06-07T14:59:09+00:00Added an answer on Junio 7, 2021 at 2:59 pm

      Si es solo un texto como menciona Bender

      “{texto}” == “SEGUIR”

      Pero si tienes una cadena de texto, yo suelo utilizar:

      “{texto}”.find(‘SEGUIR’) > 0

      Un abrazo

        • 1
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Leave an answer
    Cancelar respuesta

    You must login to add an answer.


    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Ask A Question

    Stats

    • Questions : 1k
    • Answers : 2k
    • Posts : 0
    • Comments : 0
    • Best Answers : 163
    • Users : 6k
    • Popular
    • Comments
    • Tags

    Related Questions

      • Answer: 1

      "Do you want to update drivers" no me deja capturar ...

      • Answer: 1

      Evolution API - Saturn Studio

      • Answer: 1

      ¿Como detener un BOT hijo y retornar informacion con expose?

      • Answer: 1

      Error en ejecución de comandos

      • Answers: 0

      Retornar informacion y Detener este robot

    Users

    Explore

    • Home
    • Popular
    • Categorías
    • Tags
    • Preguntas
      • Nuevas Preguntas
      • Más votadas
      • Más visitadas
      • Más respondidas

    Footer

    rocketbot white

    Rocketbot SpA | Todos los derechos reservados 2018 - 2020

    © 2020 Discy. All Rights Reserved
    With Love by 2code.

    Insertar/Editar enlace

    Ingresa la URL de destino

    O enlaza el contenido ya existente

      No se especificó ningún término de búsqueda. Se mostrarán los elementos recientes. Busca o usa las flechas arriba y abajo del teclado para seleccionar un item.