Jump to content

Array Information


Recommended Posts

Having collected information about array using the program below i am struggling to use the information.

I want tp display a number of differnt things.

Total number of players

And if each player is playing

I tried get the program to display as 0 or 1 for each player using the code but it did not work.

Please help

Global $Player[11]

Dim $x[11] = ['', 559, 618, 696, 599, 443, 381, 208, 126, 196, 254]

Dim $y[11] = ['', 136, 161, 238, 314, 380, 383, 311, 238, 155, 130]

For $i_Count = 1 To 10

If PixelGetColor($x[$i_Count], $y[$i_Count]) == 16768561 Then

$Player[$i_Count] = 1

ExitLoop

EndIf

Next

MsgBox(0,"", $Player[1]$Player[2]$Player[3]$Player[4]$Player[5]$Player[6]$Player[7]$Player[8]$Player[9]$Player[10])

Link to comment
Share on other sites

maybe

Global $Player[11]
Dim $x[11] = ['', 559, 618, 696, 599, 443, 381, 208, 126, 196, 254]
Dim $y[11] = ['', 136, 161, 238, 314, 380, 383, 311, 238, 155, 130]



For $i_Count = 1 To 10
If PixelGetColor($x[$i_Count], $y[$i_Count]) == 16768561 Then
$Player[$i_Count] = 1
Else
    $Player[$i_Count] = 0
EndIf
Next
MsgBox(0,"", $Player[1] & $Player[2] & $Player[3] & $Player[4] & $Player[5] & $Player[6] & $Player[7] & $Player[8] & $Player[9] & $Player[10])

8)

NEWHeader1.png

Link to comment
Share on other sites

That works a treat thanks

maybe

Global $Player[11]
Dim $x[11] = ['', 559, 618, 696, 599, 443, 381, 208, 126, 196, 254]
Dim $y[11] = ['', 136, 161, 238, 314, 380, 383, 311, 238, 155, 130]
For $i_Count = 1 To 10
If PixelGetColor($x[$i_Count], $y[$i_Count]) == 16768561 Then
$Player[$i_Count] = 1
Else
    $Player[$i_Count] = 0
EndIf
Next
MsgBox(0,"", $Player[1] & $Player[2] & $Player[3] & $Player[4] & $Player[5] & $Player[6] & $Player[7] & $Player[8] & $Player[9] & $Player[10])

8)

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