Re: [Circle] [Newbie

From: marimah@ksu.ksu.edu (marimah@ksu.edu)
Date: 11/22/96


>> >
>> >extern char *races[]; /*constants.c */
>> >sprintf ( buf, "Race: [%d] %s \r\n",GET_RACE(ch), races[GET_RACE(ch)]);
>> >
>> >
>> >
>> >GET_RACE() returns the lookup number for the string names stored in
>> >races[].
>> 
>> ok, I put that in and got a warning on that line : array subscript has type
>> 'char'
>> 
>> what'd I do wrong?
>
>I think in yor first post you said you changed the type in all the right
>places... if so, change it back to int :)


ok, I searched around and found this piece of code in act.wizard.c under the
do_stat function:

        strcpy(buf, "Class: ");
        sprinttype(k->player.class, pc_class_types, buf2);

so I thought I could put something similar in act.informative.c under the
do_score function:

        strcpy(buf, "Race: ");
        sprinttype(k->player.race, pc_race_types, buf2);

but it says k is undeclared and I can't figure out where it is declared. Is
there an external variable or function I need to include at the top and if
so could someone shed some light as to what it is? Thanks alot for your help :)

Mark


>-Derek
>--
>
>--    dkarnes@mystech.com
>--    Serapis, Imp of Dark Pawns
>--    knight.ufp.org 4000
>--    Open for Beta testing
>+-----------------------------------------------------------+
>| Ensure that you have read the CircleMUD Mailing List FAQ: |
>|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
>+-----------------------------------------------------------+
>
>

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



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