Jump to content

The joy of using arrays with pics


SuperHBob
 Share

Recommended Posts

I'm pretty sure this is an easy fix, but I couldn't find

anything in a search and my brain is too far melted to

try to understand the error.

I'm making a window to make a simple map editor (with

simple graphics) and it was working pretty well until I started

tweaking the code to make it run smoother.

Basically there's a 10x10 map of tiles (currently grass or

empty tiles) and when the mouse moves over that

section of the window a little red cursor follows the

mouse letting the user know which tile the mouse is

on. (sort of like the Starcraft campaign editor without

the triggers)

*note: all the tiles are using the GUICtrlCreatePic thing

to work. Thus being forced to reload (GUICtrlSetImage)

the tile after the cursor moves off the tile.

It was working fine until just recently I noticed that the

window will now simply end giving me the run time error:

"

==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

"

(it crashes after the mouse moves the cursor about 50 times.)

Then it points to the array that contains the indexed constants of the

file names as though that would help me fix the problem. :dance:

I was wondering what exactly this error was referring to

(the problem not the object, I already know the object)

But I really didn't know what to do at this point, but I was wondering

if it had anything to do with loading too many pictures or if I needed

to destroy then remake the controls or what.

Any help would be appretiated.

(I'll also post the code, but I didn't think it would help in this case)

thanx .... my brain ---> :whistle:

Link to comment
Share on other sites

nvmd. I seemed to have fixed my own problem.

I screwed with it for half an hour. Finally found it. :whistle:

Turns out I had done some bad math and it made

my rounding function throw the cursor to a location that

didn't exist. :D:D:dance:

Giving me that error that actually didn't have anything

wrong with. :(:dance:

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...