fb:porticula NoPaste
highscore - patch (debug)
Uploader: | AndT |
Datum/Zeit: | 14.01.2008 23:16:33 |
sub highscore(punkteN as integer, laengeN as integer)
' Patch
dim as integer punkte ( 1 to 11)
dim as string nam ( 1 to 11)
dim as integer laenge ( 1 to 11)
' Patch end
dim as integer i, i2, i3
open "highscore.dat" for random as #1
for i = 1 to 10
input #1 ,Punkte(i), laenge(i), nam(i)
next i
for i2 = 1 to 10
print "Debug : I =";I
print "Punkte(i)=";punkte(i)
if PunkteN < punkte(i) then
for i3 = i2 to 10
punkte(i3) = punkte(i3+1)
nam(i3) = nam(i3+1)
laenge(i3) = laenge(i3+1)
next i3
Punkte(i2) = PunkteN
laenge(i2) = laengeN
input "Name eingeben:", Nam(i2)
exit for
end if
next i2
for i = 1 to 10
write #1, Punkte(i), laenge(i), nam(i)
next
end sub