Jump to content
Sign in to follow this  

Help array skipping number

Recommended Posts

I seem to be hitting a wall, when I run the code below it skipped a few row in an array when I including the vertical array .

please help , I need an fresh eye to point out my error . thanks

#include <Array.au3>
Global $Matrix_o[1] = ["00"]
Global $Matrix_o_height[1] = ["1"]
Global $Vertical[10] = [3,3,3,1,3,4]

$MatrixType = $Matrix_o
findnumber($MatrixType )

Func findnumber($MatrixType)
local $landing
local $Score[1]
local $numberofscore =0
FOR $h =0 to UBound($MatrixType)-1 Step 1
For $i = 0 to UBound($Vertical) - StringLen($MatrixType[$h]) Step 1
    for $j =0 to 10 step 1

        if  $j = $i Then
          $numberofscore += 1
          ReDim $Score[$Score[0] + $numberofscore]
         $Score[ubound($Score)-1] =  $Vertical[$i] & "-" & $i  & "-" & $h   
; it doesn't skip when I excluded the vertical array
         ;$Score[ubound($Score)-1] =   $i  & "-" & $h   

    Next ; for j
Next ; for i
NEXT ; for element

Share this post

Link to post
Share on other sites

Hello Victor,

try adding :

$Score[0] = 1

after you declared $Score.

Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...