If statement not working (shows false although should be true)

Larsometer

Новичок
Регистрация
12.10.2019
Сообщения
14
Благодарностей
1
Баллы
3
Am a bit desperate. Was extracting IP address from a website and extracted some text that I do compare (to recognize IP change of a rotating proxy). I put the text into variable. Although text in two variables is identical if statement delivers false. So I manually put the IDENTICAL text into two different variables for a test run (xxx is just chosen to hide true IP in this post). IF statement again delivers false. Even if I add annotation marks the result is still wrong (shot 2). I have also tried to put the text in the var declaration into annotation but again wrong.

So..... Why is the IF statement failing?

Shot1:
44839


Shot 2:
44838
 
Последнее редактирование:

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 413
Благодарностей
5 900
Баллы
113
I would remove extra words and just compare IP-addresses.
Also, you should compare them as text in '' quotes.
I've attached the example.
 

Вложения

  • Спасибо
Реакции: Larsometer

Larsometer

Новичок
Регистрация
12.10.2019
Сообщения
14
Благодарностей
1
Баллы
3
Thank you. Seems like a formatting issue. Tried with text quotes as well but had the extra words. Without extra words it works.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)