Point you in the right direction.... *ponders* Muster up about idk $20 and
go buy a programming book. Then open the book and read the chapter on
pointers, structures, and arrays. Then after that read the chapter on linked
lists. Then go look at your code and see where you got confused. Also first
rule of programming is you can't use the same variable name for two
different variables.... pRoom->step[step].list = list;  your using the step
struct for step.list but your also looking at the step spot of the step
structure.

To help us try and help you. You would need to post more of the code, we
would need all the variable definitions in that function. And then all of
the structures definitions so we could see how you have your variables
setup. Meaning we need to know what your two different step variables are
defined as.


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tristan M
Sent: Wednesday, September 28, 2005 8:19 PM
To: [email protected]
Subject: problem with linked lists

i think these are linked lists...
what i'm trying to do is create a linked list, like the mprog one but i keep

getting errors when compiling, heres the code:

403        STEP_DATA *list;

453        list->next = pRoom->step.list;
454        pRoom->step[step].list = list;

in merc.h

      typedef struct step_data STEP_DATA;

struct step_data
{
        int vnum;
        int current;
        int step_type;
        STEP_DATA *next;
};



so i try and compile that and i get this:
olc_step.c: In function `stedit_addprog':
olc_step.c:453: array subscript is not an integer
olc_step.c:454: array subscript is not an integer


i thought i basically copied how progs worked...can anyone point me in the 
right direction?


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

Reply via email to