Page 1 of 1

Rel-Lib & Memoryproblem

Posted: Sun Oct 17, 2004 12:01 pm
by Stormy
Hi,

have a problem with my QBasic 4.5 and my program. Some errors occurr, which doesn't should be. I often get "Subscript of range", but there is just no chance that this error will appear! The index of some arrays are grown higher, that they should be. I often received index-values like 17166 or something like that. Followed by this, other errors are there, too ! =/

See the pics:
http://other.storm-master.de/rpg/error.gif
http://other.storm-master.de/rpg/error2.gif

Well, and this is normal state:
http://other.storm-master.de/rpg/normal.gif

AND I DID'NT CHANGE THE SOURCE! I only re-started the QB-IDE several times again.

Of course I would share my source, when it's demanded. Maybe it has something to do with the memory of qb4.5. FRE(-2) says, that i have only 1186 remaining.

NEED HELP!

Stormy

Posted: Sun Oct 17, 2004 4:57 pm
by Z!re
I had the same problem, it occured when I read XMS at the wrong offsets, loading a tile way wrong. (XMS to PUT data)

After a while the program hangs.



Make sure you gretreive the sprites from the correct location, and that you have allocated enough memory for it.

Posted: Mon Oct 18, 2004 1:28 am
by Guest
Never, ever use Fre(n), with any XMS rotuine. Trust me, it's not worth the crash. :*)

Posted: Wed Oct 20, 2004 4:08 am
by Anonymous
There's something wrong with the XMS routines of Rel, I used them for my project as well, and it didn't work (I get the same garbage as you).

I'm using the Virtual XMS routines of NeoLib v1.6 now, and they work fine.