• Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Bablosoft

Best way to check many variabels?

Scheduled Pinned Locked Moved Support
9 Posts 3 Posters 1509 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rekaa0251
    wrote on last edited by
    #1

    I'm creating a bot that checks a phone number and if a phone message matching a certain country then it will type in that language.

    Heres the basic logic:
    Check what number
    If the number is +1
    Type in english

    How would i make it easy for myself with this? My hard solution to this is to make a list of all the countries for example:
    if (phonenumber) == +1
    phone number is in english
    if (phonenumber) == +2
    phone number is in xxx

    That would end up in lots of code. Is there anything i can do?

    FoxF 1 Reply Last reply
    0
  • FoxF Offline
    FoxF Offline
    Fox Bablosoft Team
    replied to rekaa0251 on last edited by
    #2

    @rekaa0251 said in Best way to check many variabels?:

    I'm creating a bot that checks a phone number and if a phone message matching a certain country then it will type in that language.

    Heres the basic logic:
    Check what number
    If the number is +1
    Type in english

    How would i make it easy for myself with this? My hard solution to this is to make a list of all the countries for example:
    if (phonenumber) == +1
    phone number is in english
    if (phonenumber) == +2
    phone number is in xxx

    That would end up in lots of code. Is there anything i can do?

    You can use third-party sites (there are many different)

    R 1 Reply Last reply
    0
  • R Offline
    R Offline
    rekaa0251
    replied to Fox on last edited by
    #3

    @Fox I think i explained it badly.
    I want to check multiple variables in one "if"
    instead doing if = true
    and then again if = true
    I want to try making it like
    if (something1) = true or (something2) true

    Or use the template and put multiple variables in it and check if (template) = true

    FoxF 1 Reply Last reply
    0
  • FoxF Offline
    FoxF Offline
    Fox Bablosoft Team
    replied to rekaa0251 on last edited by
    #4

    @rekaa0251 said in Best way to check many variabels?:

    @Fox I think i explained it badly.
    I want to check multiple variables in one "if"
    instead doing if = true
    and then again if = true
    I want to try making it like
    if (something1) = true or (something2) true

    Or use the template and put multiple variables in it and check if (template) = true

    Use a logical "OR" or a logical "AND"
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators

    test script

    R B 2 Replies Last reply
    1
  • R Offline
    R Offline
    rekaa0251
    replied to Fox on last edited by
    #5

    @Fox [[ALL_MATCH_LAST_MESSAGE]].match("hi") || [[ALL_MATCH_LAST_MESSAGE]].match("love")
    Can i use it like this?

    FoxF 1 Reply Last reply
    0
  • FoxF Offline
    FoxF Offline
    Fox Bablosoft Team
    replied to rekaa0251 on last edited by
    #6

    @rekaa0251 said in Best way to check many variabels?:

    @Fox [[ALL_MATCH_LAST_MESSAGE]].match("hi") || [[ALL_MATCH_LAST_MESSAGE]].match("love")
    Can i use it like this?

    Yes, you can. It was faster to check on your own.

    1 Reply Last reply
    0
  • B Offline
    B Offline
    basmail
    replied to Fox on last edited by basmail
    #7
    This post is deleted!
    1 Reply Last reply
    0
  • B Offline
    B Offline
    basmail
    wrote on last edited by
    #8

    @Fox
    c2a8404a-3afc-4228-903e-3214897de618-grafik.png
    It is a while loop that should check whether val1 and val2 are set to "done", in this status the while loop is simply completed. What am I doing wrong?

    Best regards!

    1 Reply Last reply
    0
  • B Offline
    B Offline
    basmail
    wrote on last edited by
    #9

    Still need help. With values like true or false its just working fine but I need 3 values :/

    1 Reply Last reply
    0

  • MR ROBOTM

    How To convert emails with passs on synced Online Notepad To Resources (and loop them for some functions and back again to check synced Online Notepad)

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    482 Views
    No one has replied
  • V

    Question : What is the best version of BAS?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    583 Views
    No one has replied
  • G

    Can we check if source contains any keyword from list?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    565 Views
    No one has replied
  • S

    Why am I getting so many fingerprint errors?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    1090 Views
    No one has replied
  • Y

    Downloading file with many threads at once not working?

    Scheduled Pinned Locked Moved Support
    0 Votes
    1 Posts
    999 Views
    No one has replied
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Popular
  • Users
  • Search
  • FingerprintSwitcher
  • CustomServers
  • AutomationPlugins
  • Login

  • Don't have an account? Register

  • Login or register to search.