Jump to content
Sign in to follow this  
Bert

sometimes works, sometimes not

Recommended Posts

Bert

I have a script tha I made into a EXE that will work on my PC, but it errors on any other PC. I know where the problem is, but I have no idea on how to solve it. From what I can figure out, the error states that line 646 , lable_4 isn't being declared.

If StringLeft((GUICtrlRead($Label_4)), 2) = $count Then

In my script, it is declared on line 330.

??????

Share this post


Link to post
Share on other sites
seandisanti

I have a script tha I made into a EXE that will work on my PC, but it errors on any other PC. I know where the problem is, but I have no idea on how to solve it. From what I can figure out, the error states that line 646 , lable_4 isn't being declared.

If StringLeft((GUICtrlRead($Label_4)), 2) = $count Then

In my script, it is declared on line 330.

??????

it's a scope issue. you're not giving it any extended scope, but using it in a function where it wasn't declared. you could just declare it as global, that should take care of it. If you're using beta you can declare it on the same line you're assigning the value to it the first time, but just adding global to the front of line 330.

Share this post


Link to post
Share on other sites
seandisanti

I tried exactly what you suggested, and it didn't work. However, you were correct on the describing the problem. I added $Label_4 to line 30, and that fixed it. Thanks! :P

glad i could help

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.