Jump to content

Problems with an If statement


Go to solution Solved by Jfish,

Recommended Posts

  • Moderators

In fact, if you are using the full SciTE installation, it should come up with a warning just for trying to use the double &.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Developers

It was giving me the error on the $browser on the dollar sign, instead of on the && operator.  Thanks for the help!

It will only give an error on $browser when that's not declared yet.

It does give an Syntax error on && :

"test.au3"(1,13) : warning: $browser: possibly used before declaration.
If $browser =
~~~~~~~~~~~~^
"test.au3"(1,36) : error: syntax error
If $browser = "Internet Explorer" &&
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"test.au3"(1,46) : warning: $server: possibly used before declaration.
If $browser = "Internet Explorer" && $server =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"test.au3"(1,13) : error: $browser: undeclared global variable.
If $browser =
~~~~~~~~~~~~^
"test.au3"(1,46) : error: $server: undeclared global variable.
If $browser = "Internet Explorer" && $server =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
test.au3 - 3 error(s), 2 warning(s)

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...