Re: uniqueness of objects

From: Erik (madison@nevada.edu)
Date: 10/13/95


> 
> >   Okay, so I decided to check ownership. I did an along the lines of...
> > obj->value[0] = atoi(&ch->player.name), 
> ...
> >   And that led to the problem. When I change obj->value[0] (not 3, my 
> > mistake), it changes it on every copy! 
> 
> not really a good thing to do.. a name is not going to be able to be
> converted to an integer, and hence 0 will always be returned
> 
   Actually, I was able to save the name as an integer. Full code was..
for(i=0;1<MAX_STRING_LENGTH;i++)
  counter += atoi(&ch->player.name[i]);
obj->value[0] = counter;

   But, you're right, this alone won't get it :) 



This archive was generated by hypermail 2b30 : 12/07/00 PST