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

From: StormeRider (
Date: 11/27/98

At 08:21 PM 11/26/98 +1100, you wrote:
>Ok, well you want to find out three values from arg2 right? How bout
>something like this...
>if(strlen(arg2) != 3)
>   send_to_char("Incorrect Syntax.");
>dur = atoi(*arg2[0]);
>eff = atoi(*arg2[1]);
>targ = atoi(*arg2[2]);
>sprintf(buf, "Ok. Values: dur = %d, eff = %d, targ = %d.", dur, eff, targ);
>Does that look right?
>-- Andrew

Why not:

if(strlen(arg2) != 3) {
   send_to_char("Incorrect Syntax.");

dur = atoi(arg2[0]);
eff = atoi(arg2[1]);
targ = atoi(arg2[2]);
sprintf(buf, "Ok. Values: dur = %d, eff = %d, targ = %d.", dur, eff, targ);


StormeRider                  ---                 --- Slackware 2.0.34

ICQ UIN: 2810688

The work I do on this project, any image creating while not at work,
any web designing done for Winds of Storm Web Design, and any
work done on any GPL'd project are not the property of my employer
Winstar iCi and I retain the sole rights to the source unless it is
stated publicly as an open source forum.

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

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