Alodar Posted July 23, 2018 Share Posted July 23, 2018 A script I've written runs every single time I personally run it, whether as an exe or in Scite. However, sometimes when I go to check on it (it runs periodically from a scheduled task) I'll come across it with an error saying that there was an error: variable used without being declared. Except, I have Opt("MustDeclareVars", 1) set, and so thus, every variable has to be declared, right? So how does this come up? I've never managed to get this error to come up when I run it in Scite, so I'm at a loss as to how to hunt down what's causing it. Suggestions or advice for me anyone? Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted July 23, 2018 Share Posted July 23, 2018 Maybe we could help you if you post the code. Still haven't the magic glass ball. Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
AutoBert Posted July 23, 2018 Share Posted July 23, 2018 Did you declare one or more variables in If ... then statement's or only for special cases and ignored warning's from au3 check? Just insert #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 in your script and don't ignore them further. Link to comment Share on other sites More sharing options...
Alodar Posted July 27, 2018 Author Share Posted July 27, 2018 On 7/22/2018 at 10:33 PM, AutoBert said: Did you declare one or more variables in If ... then statement's or only for special cases and ignored warning's from au3 check? Just insert #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 in your script and don't ignore them further. This is indeed what happened. I had a 'local' declared in an if, but not in the 'else' for it. Using all these parameters allowed me to find the issue. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now