English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. Blitz Basic (http://eab.abime.net/forumdisplay.php?f=126)
-   -   File Handling in BLitzmode (http://eab.abime.net/showthread.php?t=98775)

timeslip1974 10 September 2019 16:24

File Handling in BLitzmode
 
Hi everyone, Im trying (and failing) with my file handling for level loading while in blitz mode and Im hoping someone can show me the errors of my way!


z=ReadFile(0,"dh2:rpg/levels/l1")
FileInput 0
For y=1 To 100
For x=1 To 100
t$=Edit$(5)
map(x,y)=Val(t$)
Next x

Next y

CloseFile 0

DefaultInput



I have this as my file load that works fine
however when I do the next inkey$ call I get the following error
cant input character from default input
Even tho Ive set the defaultinput back after loading the file info.


If I call the same statement before going into blitz it works fine.......

SavageMonkey 10 September 2019 16:53

I don't think you can do any file I/O in Blitz mode. If you switch to QAmiga mode temporarily you'll be able to do file I/O without losing your Blitz mode display.

timeslip1974 10 September 2019 16:54

Tried that, it does the file handling fine - its the dropping back to defaultinput while in Blitz mode thats the problem

timeslip1974 10 September 2019 17:18

Got around it by using rawstatus() instead of inkey$ for key press checking

SavageMonkey 10 September 2019 17:29

Glad you sorted it :-]


All times are GMT +2. The time now is 15:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.04527 seconds with 11 queries