tag euch
könnt ihr hier mal bitte schauen, wieso die for next schleife nicht funktioniert?
$startx , $starty , $x3 , $y3 wurden mit zahlen in ein array gespeichert, funktioniert auch super wenn ich sie mir über _Arraydisplay anzeigen lassen.
For $i = 0 To 34
for $b = 1 to 15
$Startx2 = $startx[$i]
$Starty2 = $starty[$i]
$x = $x3[$b]
$y = $y3[$b]
If $x > $startx2 and $y > $starty2 Then
$routex = $x-$startx2
$routey = $y-$starty2
If $routex > $routey Then
$first = $routex-$routey
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routey&" Felder"&@CRLF)
Else
$first = $routey-$routex
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routex&" Felder"&@CRLF)
endif
Endif
If $x < $startx2 and $y < $starty2 Then
$routex = $startx2-$x
$routey = $starty2-$y
If $routex > $routey Then
$first = $routex-$routey
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routey&" Felder"&@CRLF)
Else
$first = $routey-$routex
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routex&" Felder"&@CRLF)
endif
Endif
If $x > $startx2 and $y < $starty2 Then
$routex = $x-$startx2
$routey = $starty2-$y
If $routex > $routey Then
$first = $routex-$routey
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routey&" Felder"&@CRLF)
Else
$first = $routey-$routex
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routex&" Felder"&@CRLF)
endif
Endif
If $x < $startx2 and $y > $starty2 Then
$routex = $startx2-$x
$routey = $y-$starty2
If $routex > $routey Then
$first = $routex-$routey
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routey&" Felder"&@CRLF)
Else
$first = $routey-$routex
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$first+$routex&" Felder"&@CRLF)
endif
Endif
If $x = $startx2 and $y > $starty2 Then
$routey = $y-$starty2
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$routey&" Felder"&@CRLF)
EndIf
If $x = $startx2 and $y < $starty2 Then
$routey = $starty2-$y
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$routey&" Felder"&@CRLF)
EndIf
If $x > $startx2 and $y = $starty2 Then
$routex = $x-$startx2
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$routex&" Felder"&@CRLF)
EndIf
If $x < $startx2 and $y = $starty2 Then
$routex = $startx2-$x
FileWrite("coords.txt","von X:"&$startx2&" Y:"&$starty2&" nach X:"&$x&" Y:"&$y&" -- "&$routex&" Felder"&@CRLF)
EndIf
Next
Next