> if (sscanf(credits, "@[EMAIL PROTECTED] [EMAIL PROTECTED]@[EMAIL 
> PROTECTED]@x", levels, builder, area) <
> 3) log_string("Problem parsing credits string.");
> if (sscanf(levels, "%d%d", &level1, &level2) < 2)
>   log_string("Problem parsing levels from credits string.");

> So we sscanf once and see if we can match everything (4 variables).  If
> not, fall back on parsing without the levels.

oops I changed the code without changing my description...

First see if we can parse out 3 variables, builder, area, and levels, into 
strings.  If not, log an error.
Then see if we can parse numbers out of the levels string.  If not, log an 
error.
If we can't parse levels, the ints level1 and level2 will remain 0.

--Palrich.


Reply via email to