Start up error

Posted by Rob Harper on Mon 30 Jun 2003 12:36 AM — 17 posts, 60,099 views.

#0
Ahh hey guys well recently I replaced everything "mana"...with "ki" thou now for some reason when I start up I get quite a few lines reading

"Sun Jun 29 08:30:07 2003 :: [*****] BUG: Fread_skill: no match: Ki"

anyone know why? and or how I can locate where this is coming from?


Thanks
USA #1
Please please *please* tell me you didnt just do a find and replace search to accomplish this (sounds rather like you did ): Anyway, the simple solution is to reload an unaltered copy of your source because you have seriously screwed up your skill and spell indexes it sounds like. Alternately, you can error by error rechange the errant "ki" (proper spelling is chi btw) placements with "mana" and pray everything still actually works afterward. As for the why behind suh an error, the reasons are honestly too comlicated for me to wrap my mind around much less try to explain, but suffice to say, tinkering with something as widely used as mana is a daunting and often abandoned idea due to the complexity of the problem.
#2
heh ..I allways tinker on a back up copy of my mud, never the running copy, thou the way I edited mana out seemed sound, I had my editor track down every instance of mana change it, everything works..but the errors I dont understand them.
#3
hmm err continued... being that I did it pretty cleanly..I figured the error wasnt directly in the code but a sourounding file..anyone have any information...
#4
and one more thing heres a larger peice of the strange start up..

Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: 75
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: Ki
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: 25
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: Ki
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: 40
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no match: Ki
Sun Jun 29 10:26:53 2003 :: [*****] BUG: Fread_skill: no

then I get 2 race errors relating to it...and then everything is fine.
Australia Forum Administrator #5
So the problem is in fread_skill. Either that is still looking for "mana" not "ki" or your skills file still has mana in it. I would look in those areas. Also check you don't have a capitalisation problem. :)
#6
heh, here is where I figure the problem is but to my lower level coder eyes ...I dont know where it would go crazy...

In tables.c

instances where you see ki mana use to be..

case 'M':
KEY( "Ki", skill->min_ki, fread_number( fp ) );
if ( !str_cmp( word, "Minlevel" ) )
{
fread_to_eol( fp );
fMatch = TRUE;
break;
}
/*KEY( "Minpos", skill->minimum_position, fread_number( fp ) ); */
/*
*
*/
if ( !str_cmp(word, "Minpos") )
{
fMatch = TRUE;
skill->minimum_position = fread_number(fp);
if ( skill->minimum_position < 100 )
{
switch( skill->minimum_position )
{
default:
case 0:
case 1:
case 2:
case 3:
case 4: break;
case 5: skill->minimum_position=6; break;
case 6: skill->minimum_position=8; break;
case 7: skill->minimum_position=9; break;
case 8: skill->minimum_position=12; break;
case 9: skill->minimum_position=13; break;
case 10: skill->minimum_position=14; break;
case 11: skill->minimum_position=15; break;
}
}
else
skill->minimum_position-=100;
break;
}

KEY( "Misschar", skill->miss_char, fread_string_nohash( fp ) );
KEY( "Missroom", skill->miss_room, fread_string_nohash( fp ) );
KEY( "Missvict", skill->miss_vict, fread_string_nohash( fp ) );
break;

case 'N':
KEY( "Name", skill->name, fread_string_nohash( fp ) );
break;

case 'P':
KEY( "Participants",skill->participants, fread_number( fp ) );
break;

case 'R':
KEY( "Range", skill->range, fread_number( fp ) );
KEY( "Rounds", skill->beats, fread_number( fp ) );
if ( !str_cmp( word, "Race" ) )
{
int race = fread_number( fp );

skill->race_level[race] = fread_number( fp );
skill->race_adept[race] = fread_number( fp );
fMatch = TRUE;
break;
}
break;

what a learning experiance ...sheesh..
#7
The fread part with "Ki" in it should go under case 'K':
Australia Forum Administrator #8
Exactly. Mana used to be under 'M' but now it is "Ki" it needs to go under 'K'. That is the sort of subtle bug you get when renaming things. :)
#9
Would that be enough to give me the hella errors?
USA #10
Yes, yes it would.
#11
Hey guys thanks for all your help, I'm stoked! It's fixed, but now I still have

Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: Ki
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: 0
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: Mana_Regen
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: 0
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: Ki
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: 0
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: Mana_Regen
Mon Jun 30 00:48:02 2003 :: [*****] BUG: load_race_file: no match: 0

This to deal with...no errors in the start up but this.

Thanks
#12
A never ending chain or errors I fix one another pops up, well I fixed the last one and a few others after it but now I get this

Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: Min_Align
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: -1000
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: Max_Align
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: 1000
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: Min_Align
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: -1000
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: Max_Align
Mon Jun 30 01:03:18 2003 :: [*****] BUG: load_race_file: no match: 1000
#13
I attempted to fix this last error by dividing "K" and "M"
before this "M" didnt exist

case 'K':
KEY( "Ki", race->Ki, fread_number( fp ) );
KEY( "Ki_Regen", race->Ki_regen, fread_number( fp ) );
break;

case 'L':
KEY( "Language", race->language, fread_number( fp ) );
KEY( "Lck_Plus", race->lck_plus, fread_number( fp ) );
break;

case 'M'
KEY( "Min_Align", race->minalign, fread_number( fp ) );
race->minalign = -1000;
KEY( "Max_Align", race->maxalign, fread_number( fp ) );
race->maxalign = -1000;
break;

...after I did that thou the compiler gives me this


gcc -c -O -g2 -Wall -DI3 -DI3SMAUG tables.c
tables.c: In function `load_race_file':
tables.c:1762: parse error before "if"
tables.c:1768: case label not within a switch statement
tables.c:1772: case label not within a switch statement
tables.c:1778: case label not within a switch statement
tables.c:1810: case label not within a switch statement
tables.c:1814: case label not within a switch statement
tables.c: At top level:
tables.c:1853: parse error before "return"
Australia Forum Administrator #14
You mean K didn't exist, you had an M before.

Anyway, it is a simple compile error, you added an extra parenthesis or something. Look around the line where the first error is.
USA #15
Actually, if thats a pasted copy of his code, he needs to add a : behind his M section heading.
#16
Meerclar thanks! that did it, I looked over my code and found no misplaced symobls... but I didnt have the ":"
I have a error free compile and start up now thanks everyone.