Tsk tsk tsk... strings don't equal strings, you know, not like this, anyways...
-----Original Message----- From: dat one guy [mailto:[EMAIL PROTECTED] Sent: Monday, August 19, 2002 8:53 AM To: [email protected] Subject: Changing the way skills and spells are handled... Hello all! First off, im using Rom24b6 with Ivans OLC 201 and Lopes Colour. Ok, so Im trying to separate skills and spells into two separate tables/files. Before I tried making a new spellsavetable in tablesave.c and testing each skill as it was loaded, if so load using spellsavetable. That didnt work. Now im trying to just have it load into the skill table and then checking if that skill is a spell, if so put it into the spell table and increase the MAX_SKILL. My problem is that now it gets to giant strength (base Rom spell, havent added/removed any base Rom skills/spells) and tells me it finds 'ÿ' in the file. Not only does it find this character, it finds too many to read with fread word. I have checked over this file many many times and cant see any characters like this. Ive even tried with other skill files and it does the same thing. Here is what I have in my code in load_skills: --snip-- skill_table[i] = skzero; load_struct( fp, &sk, skillsavetable, &skill_table[i] ); #if defined(PART_SPELLS) /* Make sure its a spell, not reserved or an empty slot */ if ( skill_table[i].spell_fun != spell_null && skill_table[i].name[0] != '' && str_cmp(skill_table[ i].name, 'reserved')) { MAX_SPELL = MAX_SPELL + 1; spell_table[t] = spzero; spell_table[t].name = skill_table[i].name; spell_table[t].spell_level = skill_table[i].skill_level[0]; spell_table[t].spell_fun = skill_table[i].spell_fun; spell_table[t].target = skill_table[i].target; spell_table[t].minimum_position = skill_table[i].minimum_position; spell_table[t].beats = skill_table[i].beats; spell_table[t].msg_off = skill_table[i].msg_off; spell_table[t].msg_obj = skill_table[i].msg_obj; ++t; } #endif ++i; } skill_table[MAX_SKILL].name = NULL; --snip-- And when I boot up, it runs for about 30 seconds, then complains about a word being too long in fread_word and dies (thats when it find the 'ÿ'). When I see whats in the spell_table and skill_table using print in gdb, spell_table[52] is fine, but spell_table[53].name is 'You feel weaker', when it should be 'giant strength'. skill_table[55].name = giant strength, so I dont understand why its not working... Im sorry if this makes no sense, and if there is any more info required, please let me know because I would really like to get this working, I really cant do anything until I fix this... Xanth __________________________________________________ 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

