The new GDK comes with new feature where you dont have to assign Ids for objects or images etc..
it will find it for you if you assign -1 to the object id var or just leave it blank.
however , when i used such a system i used one of the following
finding empty id slot
int FreeObject(void)
{
int t = 1;
while (dbIsObject(t) == 1)
{
t++;
}
return t;
}
this will cycle trough all objects from slot 1 to whatever slot is empty.
or the other way
int FreeObjectCounter = 0;
int FreeObject(void)
{
FreeObjectCounter ++;
return FreeObjectCounter;
}
this a simplier way to achive the same goal will just increase the counter each time it is called and return a new and open id slot.
however
since DarkGDK 2.0 i started using the built in feature as mentioned at the top of this post, but something very strange is happening
it gives random numbers instead of increasing or open slots
one id can be 1 and the other can be 2304 and the third can be 5
i dont know why it is working like that i dont have the open source for it but should it do that or is that a bug?
cause if i want to use dbPickObject(MouseX,MouseY,startId,endId) it gets kinda messed up where the command cycle trough alot of ids that arent neccesery for it.
any suggestion how this system works?
maybe its a bug of somekind and mybe that is causing my games to crush sometimes..
mistrel? ..