This is interesting... http://www.alsherok.net/Code/BFD.txt Breaks any semblance of cross-platform compatibility, but it's interesting.
----- Original Message ----- From: "Josh" <[EMAIL PROTECTED]> To: "Rom" <[email protected]> Sent: Saturday, June 08, 2002 12:05 PM Subject: Re: Writing spell_fun to a file that can be read back in.... > 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

