Jump to content
Sign in to follow this  
Ben Hovell

Array Information

Recommended Posts

Ben Hovell

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])

Share this post


Link to post
Share on other sites
Valuater

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

Share this post


Link to post
Share on other sites
Ben Hovell

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)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.