Help with "if command" in script

Hello ,
I have this part of the code and it doesn’t comapre me the variable to the number , why?

:global SendLEDs ;
:global OldSendLEDs ;
:global LEDS ;
:global S1;
:global S2;
:global S3;
:global S4;
:set SendLEDs ($S1.$S2.$S3.$S4);
:if ($SendLEDs = 0000) do={:set LEDS A};
:if ($SendLEDs = 0001) do={:set LEDS B};
:if ($SendLEDs = 0010) do={:set LEDS C};
:if ($SendLEDs = 0100) do={:set LEDS D};
:if ($SendLEDs = 0101) do={:set LEDS E};
:if ($SendLEDs = 0110) do={:set LEDS F};
:if ($SendLEDs = 1000) do={:set LEDS G};
:if ($SendLEDs = 1001) do={:set LEDS H};
:if ($SendLEDs = 1010) do={:set LEDS I};

I can see that $SendLEDs = 0000
but the compare say it’s false
why?

also if I have $SendLEDs=1010 \ 1000 \ 1001 it doesn work

Try
:if ($SendLEDs = “0000”)

I have try it
didn’t help…

what I did instead is - I ahve added latter to all
so now I have
a0000
a0110

and now it’s working
it’s like he ignore the first 0 in the compare :neutral_face:

Unfortunately I cannot repeat the same problem, it works fine for me with the quoted text

[admin@pagrabs_wifi_test_gw] > :global S4 0;       
[admin@pagrabs_wifi_test_gw] > :global S3 0;       
[admin@pagrabs_wifi_test_gw] > :global S2 0;       
[admin@pagrabs_wifi_test_gw] > :global S1 0;       
[admin@pagrabs_wifi_test_gw] > :set SendLEDs ($S1.$S2.$S3.$S4);
[admin@pagrabs_wifi_test_gw] > :environment print 
S1=0
S2=0
S3=0
S4=0
SendLEDs="0000"
[admin@pagrabs_wifi_test_gw] > :if ($SendLEDs = "0000") do={ :put "true"}
true

OK
thank
I will try again