Jump to content

help me pls


Recommended Posts

would love if someone could point me in the right direction to fixing a problem i have with my code, here it is..

$bars = 5

While 1 ;==>loop testing a pixel on some bars for color change

Dim $pixcolarraytest[$bars][4][2]

For $i = 0 To $bars - 1

$pixcolarraytest[$i][0][$danger] = PixelGetColor($colorbar[$i][0][0][0], $colorbar[$i][0][0][1])

MsgBox(0, "Wingman", "so we just pixel tested the bar " & $i & " at box at mouse loc")

MouseMove($colorbar[$i][0][0][0], $colorbar[$i][0][0][1], 0)

next

WEnd

What i am trying to achieve is for the [$danger] part of the array to switch to a value between 1 and 5 without effecting the other [$danger] elements in other parts, for example..

$pixcolarraytest[1][0][0]

$pixcolarraytest[2][0][0]

$pixcolarraytest[3][0][1] <<< only this one changed in the loop

$pixcolarraytest[4][0][0]

$pixcolarraytest[5][0][0]

any help of advice would be greatly appreciated, thx

Edited by deanthalas
Link to comment
Share on other sites

I see two problems here.

1 - $danger does not seem to be defined anywhere.

2 - your Dim statement for $pixcolarraytest should be before your While statement. Otherwise, you are re-declaring the variable with each iteration, which should be giving you an error message. Since you do not need to change the size of your array, a ReDim would not be needed. Just move the Dim statement up.

Link to comment
Share on other sites

thx for the reply all but i have figured a work around to the problem where i just made a new array on each stage of the loop and assigned the $i value, i was then able to redim the array and use it as needed.

p.s its not a game bot, thx again.

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...