Jump to content
Sign in to follow this  
Burgs

Variable not declared

Recommended Posts

Burgs

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.

Share this post


Link to post
Share on other sites
monoceres

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!

Share this post


Link to post
Share on other sites
Burgs

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

Share this post


Link to post
Share on other sites
monoceres

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!

Share this post


Link to post
Share on other sites
Jos07

can you show what are you doing with your code ?


Always Keep Your Sig Small... Like me :D

Share this post


Link to post
Share on other sites
Burgs

Thank you. The Dim seems to correct it.

Edited by Burgs

Share this post


Link to post
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
Sign in to follow this  

×