BUG: Save_skills : NULL fpn

Posted by Thornan on Sun 30 Oct 2005 10:45 PM — 12 posts, 33,958 views.

#0
What does this bug mean and how do I fix it?

I installed OLC 201 on Rom24b6 after I put in lopes colour and copyover 4. And this is the bug I get. I have tried figuring it out but I cannot figure it out. please help me with it.
USA #1
Could you search the code for that bug message, and post the related code?
#2
grep -r Save_skills ./
Binary file ./tablesave.o matches
./tablesave.c: bug( "Save_skills : NULL fpn", 0 );
Binary file ./rom matches

In tablesave.c is this:

void grabar_skills( void )
{
FILE *fpn;
int i;

fpn = fopen( SKILL_FILE, "w" );

if ( !fpn )
{
bug( "Save_skills : NULL fpn", 0 );
fclose( fpn );
return;
}

fprintf( fpn, "%d\n", MAX_SKILL );

for ( i = 0; i < MAX_SKILL; ++i )
{
fprintf( fpn, "#SKILL\n" );
save_struct( fpn, &sk, skillsavetable, &skill_table[i] );
fprintf( fpn, "#END\n\n" );
}

fprintf( fpn, "#!\n" );

fclose( fpn );
}


I am not sure what to do here. I am still learning to code so I sometimes get stumped.
USA #3
This means that the SKILL_FILE is either missing or has the wrong permissions. Check in the header file for what SKILL_FILE is, and see if it exists.
#4
This is what's in the tablesave.h (header) file. But I think it is in another language. Atleast part of it. I don't recognize these "grabar" "cargar" words.



void grabar_skills( void );
void grabar_razas( void );
void grabar_progs( int minvnum, int maxvnum );
void grabar_tabla_comandos( void );
void grabar_socials( void );
MPROG_CODE * pedir_prog( int vnum );
void cargar_comandos(void);
void cargar_razas(void);
void cargar_socials(void);
void cargar_skills(void);
USA #5
Well they could be a short name, like cargar could mean "C Arg Ar" which could be short for something. But nothing there relates to SKILL_FILE.

Do this command in the shell:
grep SKILL_FILE *.h
#6
ok. It returned nothing. Just back to prompt.
USA #7
If it's not even defined, that's a bigger problem. Try searching for SKILL_FILE in all files. Was that grabar_skills function part of stock Rom, or the snippet you put in?
#8
grabar is part of the olc that I am installing. not part of stock rom. I tried a search in all files and it didn't return anything either.
USA #9
Ah well then, three things are possible. Something was missed in the installation of the snippet (it should have told you to define SKILL_FILE as something), the snippet forgot to include that instruction, or it was assumed SKILL_FILE was already defined. I'm not familar with ROM. Double check the snippet and make sure there is nothing else about SKILL_FILE. If there isn't, you'll have to ask the original snippet author, or wait for someone who knows a bit more about ROM than myself.
#10
ok thanks for the help you have given me. I appreciate it. If you know of anyone who knows more about ROM please could you point them toward this thread? Thanks again. Oh and I found out what grabar means. It's spanish for: to record
USA #11
Ah okay, in Spanish eh.

Anyways, mudmagic.com has their own section of the forum for ROM. You could try asking there.