Project

General

Profile

Bug #1048

input cmd

Added by malcolm harvey about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
01/08/2023
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

Pauls notes on the subject...And then ill add my notes as well and example.
The below now will not work now in V1.0 U37
..
(Pauls notes).
'Also, I've been getting the same thing with Open In, but it seems to be input# (which was the next line) that was causing the hang. If I change it to line input it continues. So input# looks to have a problem. This code worked a few months ago.
Multiple problems. When I thought Open In was okay I put the filename back from levels to levels.txt as it used to be and not Open In is locking up. So open in with a .txt on the end, or input# both don't work for me, plus volume.
Any my game is now running after removing volume and renaming the txt file to not have an extension, and putting the input# to a line input #.'
..

(My notes)..
Using the below always worked right up until also a few mths ago.
Now Input is not working, just hangs as paul found above.
This example worked up last working live version a few mths before release.
(Note: The Volume issue as paul describes there is a sep ticket on this.)
..
#splashScreen:false
#useAssetsResources:false

Print "Current directory:";dir$ //Application direction for files read/write
dim mapposloc$(10) //(mapposloc) access file can be 10 positions (numbers)
nextword$=""

                                  //Read.....from a file mapposloc.txt to array mapposloc$().
print "press a key"
wait key

Open in 1,"mylist.txt"          // Open the (mapposloc) access file

print "file open"
wait key

                                   // Sequential file handling

For n = 1 to 10                    //mapposloc.txt has 10 items
    Input #1,nextword$             // Input from file or read to program memory each item in sequence from file number 1 into nextword, (#1)
    mapposloc$(n) = nextword$      //Place in element n of the array, mapposloc$(n) 1-10
    print nextword$                //print them to see on screen
Next

    print "first bit done"

Close 1                            // Close the word list file

print mapposloc$(1)                //now print the words out from array
print mapposloc$(2)                //what we read in
print mapposloc$(3)

print "second bit done"

wait key

Also available in: Atom PDF