14.03.2014, 03:28
It is a very simple question but I am unable to solve the problem. I have a data that holds these values:
inside a While AddItem I have a read dat, but it only is reading -1.
When I run the program instead of getting -1,-1,-1,-1, 16...I am getting -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.....all the way up to 59th -1. It is inside a loop that holds 59 items. I am Ok with the rest of them being -1...what I am not going that there is no 16 in the list. It is as if...and it is true...it is as if...it is reading only the first value from Data which is -1...then repeating that same first value 59 times.
inside a While AddItem I have a read dat, but it only is reading -1.
Code:
While AddItem(Objects())
Restore MyValues
Read dat(iCounter)
NPrint dat(iCounter)
If dat(iCounter)=-1 Then GoTo Skipping
.....
Skipping:
iCounter=iCounter+1
Wend
MyValues:
Data -1,-1,-1,-1,16
When I run the program instead of getting -1,-1,-1,-1, 16...I am getting -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1.....all the way up to 59th -1. It is inside a loop that holds 59 items. I am Ok with the rest of them being -1...what I am not going that there is no 16 in the list. It is as if...and it is true...it is as if...it is reading only the first value from Data which is -1...then repeating that same first value 59 times.