English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. AMOS (https://eab.abime.net/forumdisplay.php?f=119)
-   -   Swap disks problem (https://eab.abime.net/showthread.php?t=106291)

sovenyimre 18 March 2021 23:29

Swap disks problem
 
I'd like to ask for a little help:

Files managed by AMOS game can't fit on one disk, so I have to manage them on multiple disks.

-First, when I check with "Exist ("file")" if the disk needed to be replaced, but then... it remembers the current status of the file I am looking for and I allways get "Exist ("file")=-1"even after I am changing the disk with the right file on.
It seems to be memorized and I can't delete it.

-Second version. If I use "Trap Load file: Errtrap = 81" instead of "Exist", the first disk change will work, it finds the file I am looking for, but... from now on, it will also memorized as existing file (and all the files I used before) and treat these files as if they were existing in the current one.
gain, I get "Exist (file) = - 1" for each file, does not matter if I use full path or just a filename.

I assume the existents of the files are stored/buffered somehow, which I should reset, and I cant find any information how to do this!?

If anyone can help me, or tell me where can I find a working example/solution to my problem?

Thank You.

Samurai_Crow 19 March 2021 02:32

The "file exists bug" is an Amiga Workbench bug and dates back pretty far. I don't think that solution is going to work.

If you want a consistent look and feel with your game and the "please insert disk named ..." requester, you can theme the Amos GUI with a custom resource bank. This will insure that the familiar aqua-scale requester on an orange background is not as ugly and will use a different palette. In fact the entire Amos GUI can be themed using a resource bank.

sovenyimre 23 March 2021 23:29

Sadly.... my quest continues.
Thank You, Samurai!

Cobe 23 March 2021 23:54

Quote:

Originally Posted by Samurai_Crow (Post 1471303)
The "file exists bug" is an Amiga Workbench bug and dates back pretty far. I don't think that solution is going to work.

Aha, thats wb's bug. Some time ago I've encountered the same problem but with Blitz Basic.
Quote:

Originally Posted by sovenyimre (Post 1471277)
I assume the existents of the files are stored/buffered somehow, which I should reset, and I cant find any information how to do this!?

I assumed the same and would like to know too if theres some solution.

sovenyimre 12 April 2021 18:47

-------------------------------------------------------------
Screen Open 0,352,288,16,Lowres : Screen Display 0,,,320,256
Hide On : Curs Off : Flash Off : Cls 0 : Ink 7,0

Do
CURFILE$="menu.iff"
Gosub INSERT

CURFILE$="level.iff"
Gosub INSERT
Loop

INFO:
Screen Swap
For S=0 To 31 : Screen Offset 0,0,S : View : Wait Vbl : Next S
Repeat : View : Wait Vbl : Until Key State(64)
For S=0 To 31 : Screen Offset 0,0,31-S : View : Wait Vbl : Next S
Screen Offset 0,0,0 : View : Wait Vbl
Return

INSERT:
LS:
Cls 0,0,256 To 320,288
FE=Exist(CURFILE$)
Trap Load Iff CURFILE$
If Errtrap=81 or FE<>-1
Text 16,268,"Insert DISK "+CURFILE$+" and Press SPACE"
Gosub INFO
Goto LS
End If
Text 16,268,"Flag for file -"+CURFILE$+": "+Str$(FE)
Text 16,280,"Error trap -"+CURFILE$+": "+Str$(Errtrap)
Gosub INFO
Return
-------------------------------------------------------------

The source abowe was the test program I used.
I spent weeks search to find a solution, and when I ask for :help, the (SIMPLE!) code suddenly works without alteration.:crazy:confused

It must be sorcery!:guru

Thank's for everyone :great

edit:
I know what sorcery caused the problem.
Turbo Plus 2.15 Extension - MULTI NO : Turned off the multitasking process, and taken days of my life
Exist and Multi No ... no friends.


All times are GMT +2. The time now is 17:47.

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

Page generated in 0.04307 seconds with 11 queries