Forum people...
I have a bowling game I first wrote using Cell's Basic in 1988. I re-wrote it in 2012 into Power Basic 4 language. I haven't touched the code yet and it won't let me compile the old code. I also ran it in the Power Basic 6.4 version with the same result. The last compiled versions I have, on disc and flash drives, work fine. It is giving me a read/write error and I can't find what it wants. The Task Manager doesn't show two versions running at once. I tried everything on the help menu for the 496 error to no avail. Any help would be appreciated.
Thanx...
Izzy
Code might or might not help...
I have a bowling game I first wrote using Cell's Basic in 1988. I re-wrote it in 2012 into Power Basic 4 language. I haven't touched the code yet and it won't let me compile the old code. I also ran it in the Power Basic 6.4 version with the same result. The last compiled versions I have, on disc and flash drives, work fine. It is giving me a read/write error and I can't find what it wants. The Task Manager doesn't show two versions running at once. I tried everything on the help menu for the 496 error to no avail. Any help would be appreciated.
Thanx...
Izzy
Code might or might not help...
Code:
OPEN "BOWL.SCR" FOR INPUT AS #1 ' Bring in the names and scores of the last scoreboard saved to the disk FOR Z=1 TO 10 INPUT #1, NAMES$(Z), SCORE(Z) NEXT CLOSE #1 ' HERE IS WHERE YOU ADD THE NAMES AND SCORES, IN PROPER PLACE, BEFORE WRITING TO FILE AND PRINTING TO SCREEN IF PT(10)>SCORE(1)THEN SWAP PT(10),SCORE(1):SWAP N1$,NAMES$(1) ' SWAP CURRENT SCORE, IF NECESSARY FOR Z=1 TO 10 IF PT(10)>SCORE(Z)THEN SWAP PT(10),SCORE(Z):SWAP N1$,NAMES$(Z) ' RE-ALIGN THE SCOREBOARD IF NECESSARY NEXT IF HM=1 THEN GOTO SKIPSECONDNAME FOR Z=1 TO 10 IF PT2(10)>SCORE(Z)THEN SWAP PT2(10),SCORE(Z):SWAP N2$,NAMES$(Z) NEXT SKIPSECONDNAME: ' WE WILL NOW WRITE THE NEW LIST TO THE DISK OPEN "BOWL.SCR" FOR OUTPUT AS #1 FOR Z=1 TO 10 WRITE #1, NAMES$(Z), SCORE(Z) NEXT CLOSE #1 GOSUB SHOWSCORES ' GO TO SHOWSCORES TO SHOW THEM ON THE SCREEN
Comment