Edit$ problems
Hiz mates.
Im doing an small thing in blitz (amiblitz 2) again but I have a problem with Edit$. I have a statement to read some data from a file that starts like this: Code:
Statement Load_Map{} The firt time I use this It works well but the second time It gives me an "Invalid Inpuit File" in FileName$ = Edit$(100) line. Im crazy with it! Any idea mates? Thanks. |
I think it might be because you have a BLITZ directive in the middle of an if clause.
BLITZ, AMIGA and QAMIGA change the entire behaviour of the compiler, going downwards from when they're used. They're not commands or statements in the normal sense. |
I think the issue is that you've redirected the input stream from the file the first time, but not set it back to what it was afterwards. Therefore when you get to the Edit$() again, it's trying to read from the first file, but you've since closed the file so it doesn't have anywhere to get its input from. Try putting the BitmapInput statement just before the Edit$() function and see if that helps.
As idrougge says, switching modes does some "interesting" things, so you might also try having the BitmapOutput on the Amiga side, since it was in the Amiga mode that the input stream was switched away. Finally, perhaps you need a Blitzkeys On statement after you return to Blitz mode, just in case that was cancelled by leaving the mode. |
I have been trying different things without success so I have re coded it from start and seems it goes better.
Thanks for the help mates! |
All times are GMT +2. The time now is 21:42. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.