Jump to content

Recommended Posts

Posted

As you'll see in the example code, all my function attempts to do is set a variable, it doesn't even attempt to return it.

Func MyFunc()
    Local $sVar = "Test" ; This is the default state for no letter O having been found
EndFunc

I can't imagine what's going wrong here. There's really nothing to troubleshoot. It seems like something is misconfigured, but I haven't tried to customize anything. I did a fresh install of AutoIt3 and the SciTE package available from AutoIt less than 2 days ago, so I would think I'm up to date. If I try to set the variable outside of the function, it works fine. Whether or not I call the function afterward seems to make no difference, I still get the syntax error.

Quote

\test.au3" (2,1) : error: syntax error (illegal character)
\test.au3" (2,1) : error: Statement cannot be just an expression.

When I looked up the errors, it seems like most people had misconfigured their development environment, so I figure that must be the case for me too, but I don't know what to do to configure it properly other than download the most recent versions of AutoIt and SciTE, which I've done.

Any help would be appreciated :)

Posted

Not trying to bump my post, I just didn't see a way to edit the original - I just wanted to mention I've also tried upgrade to the newest Beta AutoIt3, and there was no change.

  • Developers
Posted

The posted script is working fine...  please post something that runs and replicate the issue.
Could be an HEX character which isn't shown in SciTE. You could show it by changing the encoding to codepage under File.

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.
  :)

Posted

BINGO! Thanks so much. I changed the encoding to UTF-8 and I'm seeing all sorts of weird characters which were otherwise not visible. I removed them and now it works.

I have no idea why SciTE defaulted to an encoding which could have hidden characters... as if programmers don't have enough to worry about hunting down a missing closing bracket or something... but I digress.

Thanks for the quick and accurate reply!

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
  • Recently Browsing   0 members

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