Sorry for the repeat post.  The list was very slow getting this out and
I must have sent it twice!
Sorry again!

-----Original Message-----
From: Mervine, Keith 
Sent: Monday, May 10, 2004 12:29 PM
To: [email protected]
Subject: Sscanf help


Greetings,
        I need to separate 3 things from my credits line.

The general format of the credits is as follows.

Credits {1  15} Palladia  The Durance of Hate~

I am using sscanf to separate out the three things I need (or at least
I'm trying.)

    if (sscanf(credits, "{%[^}]} [EMAIL PROTECTED]@]", levels, creator, area) <
3)
    log_string("Problem parsing credits string.");

    if (sscanf(levels, "%d%d", &minlevel, &maxlevel) < 2)
    log_string("Problem parsing levels from credits string.");

    trimchr = &creator[strlen(creator)];
    do {*(trimchr--) = '\0';} while (*trimchr <= ' ');


For some reason its parsing the following.

Levels  : 1 - 15   
Creator : Palladia  The Durance of Hate
?
--

What did I miss to have it stop after reading Palladia....?

-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom

Reply via email to