Jump to content

Subscript used on non-accessible array - (Locked)


Recommended Posts

Hi, I wrote a few lines of code for my little game.  But I kept getting error message please help.

First, I use PixelSearch to pinpoint the whereabouts of my character. (the green hair)

Then I use that stored array to see if there are any monsters near me, by defining a searchbox based on that found pixel earlier.

Below is my code.



   $char = PixelSearch(68,215,822,735, 0x006C58, 5)
   $nearmob = PixelSearch($char[0]-90, $char[1]-90, $char[0]+90, $char[1]+90, 0x906038, 5)

   if not (@error) Then

      Send("{space down}")




Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Recently Browsing   0 members

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