Re: oasisOLC bug

From: Peter Ajamian (
Date: 12/30/99

Manafort wrote:
> Everything in my oasis olc works fine except for medit when i try to set
> lvl, damroll,hitroll and a few others no matter what i put it goes to its
> max
> ex) i put the mobs lvl at 4 and it went 100 and exp and gold does work but
> positions dont it always goes to WRITING. any idea what could cause this?

Well, without seeing your code I can only speculate (guess) on what's
happening.  Oasis OLC has range checking for values that you enter for
the different attributes and rather than informing you of an out of
range value it will set the value to the closest in-range value.  For
example if level has a range of 1 to 100 and you type in 150 for level
it will set it at 100, if you type in -50 it will set it at 1.  It works
with code like the following...

x = atoi(arg);

if (x < MIN_VAL) x = MIN_VAL;
if (x > MAX_VAL) x = MAX_VAL;

What I suspect is happening is that the range checking is showing out of
range when the value is in fact in-range.  That could be caused by
swapping the min and max values, or it might be caused by using a <
instead of a > in the MAX_VAL test, or any number of different things.

Regards, Peter

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

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