Batch Invalid Number error? -
this strangest error i've ever encountered. while i've seen the:
invalid number. numeric constants either decimal (17), hexadecimal (0x11), or octal (021).
error million times, can't understand what's wrong code:
if "%ss%" == "00" ( set /a 3n%1+=%3 set /a 3n%1+=%4 )
this gives:
c:\users\...>if "00" == "00" ( set /a 3n2+=1 set /a 3n2+=3 ) invalid number. numeric constants either decimal (17), hexadecimal (0x11), or octal (021).
i can't figure out why happening.
note: when expression false, error still fires.
the error comes fact variable name 3n2
starts number.
while variable name technically valid, starting number bad idea , should never it.
to avoid error, change first character of variable name letter or underscore.
if "%ss%" == "00" ( set /a _3n%1+=%3 set /a _3n%1+=%4 )
Comments
Post a Comment