the function is cloneID() and is global
- Code: Select all
char *cloneID(const char *cname, int cindex)
{
char buffer[50];
sprintf(buffer,"%s.%d",cname,cindex);
return buffer;
}
the idea is to use the resulting string in any other function, not just Getclone
eg:
- Code: Select all
int i;
for (i=4;i<11;i++)
{
DestroyActor(cloneID("test",i));
}
but, I think I am doing something wrong with the string types I am using or something.. the executable version appears to work OK.. but in 'Game Mode' it has varying results ( works sometimes, others not.. ) or is it just my computer
which means I have to compile each time I want to test it..
any ideas?
thanks