@zeido To test for existence, you must first identify the characteristics of the ad, ANYTHING.
If you don't identify the ad, you can't work with it.
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 englishHow 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 xxxThat would end up in lots of code. Is there anything i can do?
-
@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 englishHow 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 xxxThat would end up in lots of code. Is there anything i can do?
You can use third-party sites (there are many different)
-
@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) trueOr use the template and put multiple variables in it and check if (template) = true
-
@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) trueOr 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_Operatorstest script
-
@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.
