its crashing because its trying to read information that is not there. I
think ÿ is equivalent to nothingness (not NULL), as ive had this same error
before. just read one word, or line or whatever, and then compare it.

i suggest making the EOF text something like END, so its easy to put in if
you have to edit the file offline.

----- Original Message -----
From: "dat one guy" <[EMAIL PROTECTED]>
To: "Ben" <[EMAIL PROTECTED]>
Sent: Monday, August 19, 2002 9:22 PM
Subject: Re: Changing the way skills and spells are handled...


> Ok, I can understand that, but, how am I supposed to compare it if it
crashes
> when it tries to read it?
> Or are you saying that the ÿ character is the 'end of file' character? and
that
> its not checking correctly?
>
> --- Ben <[EMAIL PROTECTED]> wrote:
> > If you keep looping (when reading) from the file, and each time check to
see
> > if the data read is equivalent to the text that marks the end of the
file,
> > it is important to have the correct format for comparing strings.
> >
> > Eg.
> >
> > if (strcmp(datafromfile,END_MARKER))
> >
> > is different to
> >
> > if (datafromfile == END_MARKER)
> >
> > ----- Original Message -----
> > From: "dat one guy" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; <[email protected]>
> > Sent: Monday, August 19, 2002 9:00 PM
> > Subject: RE: Changing the way skills and spells are handled...
> >
> >
> > > THen what?
> > > I tried using str_dup, but the same thing happened...and why would it
> > matter if
> > > the problem is when its reading from the file? Not trying to be rude,
> > rather
> > > just wondering...
> > >
> > > --- [EMAIL PROTECTED] wrote:
> > > > Tsk tsk tsk... strings don't equal strings, you know, not like this,
> > > > anyways...
> > > >
> > >
> > >
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > HotJobs - Search Thousands of New Jobs
> > > http://www.hotjobs.com
> > >
> > > --
> > > ROM mailing list
> > > [email protected]
> > > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> > >
> >
> > --
> > ROM mailing list
> > [email protected]
> > http://www.rom.org/cgi-bin/mailman/listinfo/rom
>
>
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com
>

Reply via email to