So when generating those keys I have to make sure they don't already exist in the database. My current solution is a procedure that generates the key, queries the db for this key and if something is wrong (key does already exist, database couldn't be opened, etc.) will call itself recursively until a unique key is found. No problem at all.
Just out of curiousity I threw the procedure in a little for...next construct that's called 1000000 times and weird erros occured (the same error everytime actually). My analysis showed me that the procedure will be called 2252 times everytime just fine before the error occurs.
I then set the for...next construct to 2252 cycles and guess what happened? Another error later in the program. I then saw that everytime my CreateKey procedure was called I create a database handle with OpenDatabase(#PB_Any,...
I use the #PB_Any method everywhere in my programs because I'd rather use handles than trying to remember numbers or handle lists of them myself. In this particular case it was my fault since I didn't CloseDatabase(db_handle,...
But what about situations where you really would need 2253 sprites, meshes, gadgets, etc. Is this a fixed PB limitation, a bug or does it have something to do with the amount of RAM my PC has?
Can be closed by admin if it's not a bug
