Re: [CODE] Tried and failed this function...

From: Jon Barrett (
Date: 11/26/98

>Ok, tried the second one, as the first did not work. It gave me
>Dur:1  Eff:0  Tar:57  when shielding a shield self 111.

  Hmm...It should have worked.  I tested that exact code I sent you and both
instances worked.  It sounds like arg2 does not have the right value in it.
Are you printing arg2 to make sure that it is the correct value?  How are
you initializing arg2, two_arguments(), half_chop(), etc?  Also It might be
a good idea to do some error checking on arg2, like Andrew said with 'if
(strlen(arg2) != 3)'.

>Well, the second worked, kinda. It gave me Dur:1  Eff:0  Tar:1
>on a shield self 111. Even a shield self 333 gave the following
>result: Dur:3  Eff:0  Tar:3.

>It seems as if the eff = (number/10)%10 don't work.

  That is strange.  Looks like there is a problem with the eff variable.  I
am using MSVC for win95 so I don't know if there are any differences if you
use UNIX or another platform.  Could be a platoform issue, but I doubt it.
Its kinda hard to just guess for places to look, so if your still havin
trouble, you can send a copy of the relevant code and Ill take a look at it.

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

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