On Sun, Nov 18, 2001 at 04:06:14PM -0500, Sandi Fallon wrote:
> In "URANGE macro..?" aon wrote:
> > I see that this function gets called by various functions, mainly to
> > generate a chance-value, but what is it actually supposed to do? What
> > effect is it supposed to generate? And how could I generate a similar
> > chance (or what ever) instead of using this function ... ?
>
> The purpose of URANGE is to constrain a value to upper and lower
> limits, and return the limit if the value exceeds it.
>
> Amusingly, it is used to correct sex changes. :)
I had a same problem with sex, the change sex and objects affecting
the sex. I fixed it by making (keeping) it an integer and every
reference to it was done via get_sex() which returned 0, 1 or 2
depending on the value of the sex-field and put that in the
table. URANGE won't fix this, because female+1 should return male,
even if it's outside the range.
value of sex-field. get_sex() returns
0 is it 0
1 is male 1
2 is female 2
3 is male 1
4 is female 2
5 is male 1
6 is female 2
Edwin
--
Edwin Groothuis | Personal website: http://www.MavEtJu.org
[EMAIL PROTECTED] | Interested in MUDs? Visit Fatal Dimensions:
------------------+ http://www.FatalDimensions.org/