Unfortunatly that is what I'm trying to do. I need to take the entry from
the const.c file and convert it to a text file that can be modded via olc.
Everything except the pointers converts nicely.
I have no idea on how to make it translate into what it actually is, which
is, for example, &spell_acid_blast.
All I need it to do is save it so it actually says &spell_acid_blast
rather than it looking like 08x325234 when I print the pointer.
Is there a simple way of doing this? Keep in mind the process will
become a dynamic file.
Many thanks to those who have responded, the advice is appreciated.
Keith
On Sat, 8 Jun 2002, Josh wrote:
> if you want it in english you can make a spell_fun table
>
> { "spell_acid_blast", spell_acid_blast }
>
> course if your trying to make these dynamic that doesnt really work either;)
>
>
> ----- Original Message -----
> From: "Keith Mervine" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Saturday, June 08, 2002 12:02 PM
> Subject: Writing spell_fun to a file that can be read back in....
>
>
> > Greetings,
> > How would one do this? I have this writing to a file but it
> > prints garbage. Any help is appreciated. Everything but the spell_fun
> > writes to a file perfectly.
> >
> > void save_skills (void)
> > {
> > FILE *fp;
> > char buf[MAX_STRING_LENGTH];
> > int i,x,y;
> >
> > fclose (fpReserve);
> >
> > if (!(fp = fopen (SKILL_FILE, "w")))
> > {
> > log_string("Cannot open skills.txt file!");
> > return;
> > }
> >
> > for (i = 0; i < MAX_SKILL; i++)
> > {
> > fprintf (fp, "%s\n", skill_table[i].name);
> > for (x = 0; x < MAX_CLASS; x++)
> > {
> > fprintf (fp, "%d
> > ",skill_table[i].skill_level[x]);
> > }
> > fprintf (fp, "\n");
> >
> > for (y = 0; y < MAX_CLASS; y++)
> > {
> > fprintf (fp, "%d
> ",skill_table[i].rating[y]);
> > }
> > fprintf (fp, "\n");
> >
> > fprintf(fp, "%s\n",skill_table[i].spell_fun);
> > fprintf(fp, "%d\n",skill_table[i].target);
> > fprintf(fp,
> "%d\n",skill_table[i].minimum_position);
> > fprintf(fp, "%s\n",skill_table[i].pgsn);
> > fprintf(fp, "%d\n",skill_table[i].slot);
> > fprintf(fp, "%d\n",skill_table[i].min_mana);
> > fprintf(fp, "%d\n",skill_table[i].beats);
> > fprintf(fp, "%s\n",skill_table[i].noun_damage);
> > fprintf(fp, "%s\n",skill_table[i].msg_off);
> > fprintf(fp, "%s\n",skill_table[i].msg_obj);
> > fprintf(fp, "%d\n",skill_table[i].cabal);
> > fprintf(fp, "%d\n",skill_table[i].race);
> > fprintf(fp, "%d\n",skill_table[i].align);
> > fprintf(fp, "%d\n",skill_table[i].group);
> >
> > }
> >
> > fclose (fp);
> >
> > fpReserve = fopen( NULL_FILE, "r" );
> >
> > }
> >
> >
> > Thanks in Advance for any advice :P
> >
> >
> >
> >
> >
> > --------------------------------------------------------------------------
> ----------------------------------------
> > Transported to a surreal landscape, a young girl kills the first woman
> > she meets and then teams up with three complete strangers to kill again.
> > - Marin County newspaper's TV listing for The Wizard of Oz
> >
> > I can bend minds with my spoon
> >
> > NON OMNIS MORIAR
> >
> > Keith Mervine
> > Raytheon ITSS -- Goddard Space Flight Center
> > NMS Developer/Resident Remedy Guru
> > 301-286-0035
> > --------------------------------------------------------------------------
> ----------------------------------------
> >
> >
> > --
> > 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
>