Jump to content

Variable not declared


Recommended Posts

Greetings,

This should be an easy question. I'm getting a "Variable used without being declared" error. I know what that means, but I don't know what the variable is or where to declare it. I'm just declaring variables on the first line of the script, don't know if that is OK or not. Where is the error output so I can see what the variable is that is causing the problem(s)? Thank you.

Link to comment
Share on other sites

Greetings,

This should be an easy question. I'm getting a "Variable used without being declared" error. I know what that means, but I don't know what the variable is or where to declare it. I'm just declaring variables on the first line of the script, don't know if that is OK or not. Where is the error output so I can see what the variable is that is causing the problem(s)? Thank you.

If you run the script in SciTe you can double click on the error in the console to jump right to the error :)

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

  • Developers

You get this error when running the Compiled version of the script ?

Try running the source and you will get more information.

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

Thank you. It seems it is a string causing the trouble, how are strings properly declared, I see info in the help for variables (Dim) but not strings...?

A variable in autoit is a variant which means that it can hold almost everything :)

Declaring a string is no different than declaring a int.

So Dim, Local or Global will do just fine :)

Edited by monoceres

Broken link? PM me and I'll send you the file!

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