Jump to content
Sign in to follow this  
madflame991

Strange error only on some computers... why?

Recommended Posts

madflame991

Can anybody explain me why do I get something like "error in line -1: array subscript dimension exceeded..." only on some computers? I just executed the compiled script on my WinXP SP1 and it worked... but on SP2 it gives me that error.

Share this post


Link to post
Share on other sites
MikeP

This is kinda vague but my first thought would be to extend your array size with Dim ? no? Unless i'm wrong that error is just that you're trying to access $myarray[1530] when your array as a size of 100 for example...

Share this post


Link to post
Share on other sites
monoceres

Yes some code is needed, but my guess is that you assume that an element exists in array when it doesn't.


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

Share this post


Link to post
Share on other sites
madflame991

still why does it run flawlessly on some machines and on others it won't even budge???

it happened on more than one script...

here's the source http://www.autoitscript.com/forum/index.ph...mp;#entry473850

thx for replying

Edit: Where is Line -1 suposed to be anyway?!

Edited by madflame991

Share this post


Link to post
Share on other sites
MikeP

Ok.. it seems like it's a guessing game so I'm gonna try it again.. various computers.. various screen resolutions.. If your script works fine on a computer in 1280x1024 and your little mario goes to any part of your screen .. then you're trying to run it at lower resolution and it crashes because (if you've putted the resolution manually (hardcoded) in your script) it tries to access areas that don't exist on a 1024x768 screen? I don't know..just a guess :) I didn't check your code. In fact the idea isn't precisely the resolution.. but the fact there's a difference between your computers that leads to an access to an unexisting array element, but that actually exist on some computers, thus the script working.

Funny script btw.

I'm on XPSP2 and it works... You didn't detailed when the crash occurs.. at the start of the script? after some time? when Mario is in a certain state? That would help to determine the cause.

Edited by MikeP

Share this post


Link to post
Share on other sites
madflame991

Share this post


Link to post
Share on other sites
MikeP

I tried that link that I found on your other thread. If it's not the same exe that isn't working, maybe re-upload it and I'll try it again?

off-topic but I found a little bug so I might as well tell you :

When mario is shooting fireballs and you're selecting Show/Hide Mate to hide it.. only the character is hidden and fireballs keep being shown for a while coming out of nowhere :)

Edited by MikeP

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  

×