A few ideas:

1) Have you thrown in a ton of sys_marker("ABC" + NULL) in your code yet?

2) You are using the "newest" A8 version, right? I think the last time I've seen a bad/ wrong file format error was before the bugfix in Version 8.46, http://manual.3dgamestudio.net/bugs.htm

3) ent_decal may fail if you use that one. Took me forever to find a random crash in a game I once made for my father, it was because of accessing an invalid/ NULL PARTICLE pointer returned by ent_decal if I'm not mistaken.

4) You're probably using something like that already but the following console has helped me a ton the last couple of years:
Click to reveal..
Code:
// made by Rackscha, adapted by Superku

#ifndef Console_h
	#define Console_h
	#include<windows.h>;

	long WINAPI WriteConsole(int Handle, char* Buffer, int CharsToWrite, int* CharsWritten, int reserved);
	long WINAPI CreateConsoleScreenBuffer(long dwDesiredAccess, long dwShareMode, long *lpSecurityAttributes, long dwFlags, long lpScreenBufferData);
	long WINAPI SetConsoleActiveScreenBuffer(long hConsoleOutput);
	long GConsoleBuffer;
	int consoleInitialized = 0;
	int consolePrintTrue = 1;
	int consolePrintTarget = 2; // write in both acklog and console

	void consoleInit()
	{
		if(consoleInitialized) return;
		consoleInitialized = 1;
		AllocConsole();
		GConsoleBuffer = CreateConsoleScreenBuffer(GENERIC_WRITE, FILE_SHARE_READ, 0, CONSOLE_TEXTMODE_BUFFER, 0);
		SetConsoleActiveScreenBuffer(GConsoleBuffer);	
	}

	void cdiag(char* AText)
	{
		if(!consolePrintTrue) return;
		if(consolePrintTarget) diag(AText);
		if(consolePrintTarget == 0 || consolePrintTarget == 2)
		{
			if(!consoleInitialized) consoleInit();
			WriteConsole(GConsoleBuffer, AText, str_len(AText), NULL, 0);
		}
	}
	
	#define cprintf0(str) cdiag(_chr(str))
	#define cprintf1(str,arg1) cdiag(_chr(str_printf(NULL,str,arg1)))
	#define cprintf2(str,arg1,arg2) cdiag(_chr(str_printf(NULL,str,arg1,arg2)))
	#define cprintf3(str,arg1,arg2,arg3) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3)))
	#define cprintf4(str,arg1,arg2,arg3,arg4) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4)))
	#define cprintf5(str,arg1,arg2,arg3,arg4,arg5) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5)))
	#define cprintf6(str,arg1,arg2,arg3,arg4,arg5,arg6) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6)))
	#define cprintf7(str,arg1,arg2,arg3,arg4,arg5,arg6,arg7) cdiag(_chr(str_printf(NULL,str,arg1,arg2,arg3,arg4,arg5,arg6,arg7)))
#endif

Use:
cprintf1("nfoo() START at frame %d...",(int)total_frames);



5) I'm not entirely convinced PROC_GLOBAL is working correctly 100% of the time. I've had rare and seemingly random occurrences of entity functions continuing after level_load which neither set PROC_GLOBAL nor called another function which set that function state. EDIT: I've pretty much removed all PROC_GLOBAL states and restructured my code accordingly.
6) This may or may not be/ have been related to 5) but I've had issues/ errors with enemies falling into oblivion and beyond the level(_ent) borders and level_load.

Last edited by Superku; 02/15/18 17:49.

"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends