Jump to content
Sign in to follow this  
Vindicator209

Line -1 error

Recommended Posts

Vindicator209

I'm pretty sure there's already a detailed post on the Line -1 error, but search doesn't like me, or maybe I'm just blind...

Either way, can anyone tell me what causes this? It only occurs when running my program for the first time after a reboot.


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites
GEOSoft

I'm pretty sure there's already a detailed post on the Line -1 error, but search doesn't like me, or maybe I'm just blind...

Either way, can anyone tell me what causes this? It only occurs when running my program for the first time after a reboot.

It's caused by an error in a compiled script. One compiled there are no line numbers for referencing so it just says -1, which could be any place in the script. Load the script itself and check it with au3check (in Scite) and see if you can find it that way. Otherwise you will have to force the error to show in the script.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Vindicator209

Ah yeah, I remember that now. Problem is, I can't get it to come up in the script.. I ran it from scite about 30 times without it giving the error... But I know its an array error so atleast I know where to look. Thanks.


[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites
CodyBarrett

Share this post


Link to post
Share on other sites
Richard Robertson

You said it doesn't work when run at startup? Have you tried scheduling the script to run at startup?

Share this post


Link to post
Share on other sites
GEOSoft

Ah yeah, I remember that now. Problem is, I can't get it to come up in the script.. I ran it from scite about 30 times without it giving the error... But I know its an array error so atleast I know where to look. Thanks.

From your origional post you will have to restart and then immediatly run it from Scite. You did say that it only happens the first time it's run after a restart.

You could also try compiling this and running it right after a startup. Just be sure to have it in the same folder as your script.

Run(@ProgramFilesDir & "\AutoIt3\AutoIt3.exe " & @ScriptDir & "\myscript.au3")


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Richard Robertson

Isn't that what I just said, George?

Share this post


Link to post
Share on other sites
GEOSoft

Isn't that what I just said, George?

I plead senility.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Richard Robertson

This is more like blindness than forgetfulness.

Share this post


Link to post
Share on other sites
GEOSoft

This is more like blindness than forgetfulness.

Maybe that too, but don't be getting snappy Richard. The difference is that I showed him/her HOW to do it which you seemed to forget to do.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites
Richard Robertson

I wasn't snappy. I also didn't think it would be required to explain how to run the script instead of the compiled file.

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  

×