While in my mod, this happens whenever i try to load a previously saved game.
Please help!
EDIT 30/11/2005
I have somehow managed to have the engine load and compile the script file fine. Doom now crashes as soon as level data is loaded. Is there a way i can dump crash info to a log file to see what's crashing the game?
Thanks
EDIT 01/Dec/2005
Thanks to Brian @iddevnet this is finally fixed. The problem is that i used (by mistake) a few func_spring (which don't save) instead of func_static. Removed them and now it works. Just so you know.
you using a custom mainmenu.gui? i think that's where the save/load game actions happen, so probably start there. other than that i dunno.
Yes, i'm using a custom mainmenu.gui but it doesn't seem to be the problem. In fact i had to pull down the console to see the error, so it loaded!
I searched the whole SDK for the specific string "couldn't load console" but didn't find it. I found:
Code:
Error( "Couldn't load %s", mapName );
in game_local.cpp, which obviously doen't apply, since "console" is not one of my map names, and
Code:
gameLocal.Error( "Couldn't load %s\n", filename );
in script_program.cpp
those are the only references to "couldn't load "<something>
But that "something" is supposed to reference a file
Can anyone help me with this?
My mod is almost finished (in fact i was beta-testing it when this happened). It would terrible not to be able to release it because of this. Everything else works great.
*EDIT* I just checked using the vanilla mainmenu and hud guis: the same error
The only thing i know for sure is that this happens while attempting to compile the map's script file. So the error is generated from this code:
Code:
void idProgram::CompileFile( const char *filename ) {
char *src;
bool result;
if ( fileSystem->ReadFile( filename, ( void ** )&src, NULL ) < 0 ) {
gameLocal.Error( "Couldn't load %s\n", filename );
}
result = CompileText( filename, src, false );
fileSystem->FreeFile( src );
if ( g_disasm.GetBool() ) {
Disassemble();
}
if ( !result ) {
gameLocal.Error( "Compile failed in file %s.", filename );
}
}
The script surely compiles fine when you load the map anew, so i don't understand. Also it seems to pass "console" as filename ???
Anyone can help please
I have a feeling i will not solve this one. I emailed brian from Id soft but haven't get a response yet.
This is a single-map mod. Can I release it without the ability to save?
A nifty trick with the D3 engine is that certain events occuring in the game engine will auto-copy the console data to clipboard. You might try letting it crash, then opening up Notepad and hit paste. There's no garauntee that it is copying it for your situation but there's a chance.
Thanks to Brian @iddevnet this is finally fixed. The problem is that i used (by mistake) a few func_spring (which don't save) instead of func_static. Removed them and now it works. Just so you know.