JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
Loading crashes with no errors 
			 
			
				Hello all- 
When changing to map 4, I am getting a CTD (Crash to desktop) when on the loading screen.  If all scripting is removed, the crash does not happen.  Here is my code for you smart people to investigate!   
void OnEnter () 
{ 
AddEntityCollideCallback("Player", "sanityrestore", "Newmap", true, 1); 
AddEntityCollideCallback("Player", "Leftstatuegasp", "StatueLeft", true, 1); 
AddEntityCollideCallback("Player", "Rightstatuegasp", "StatueRight", true, 1); 
AddEntityCollideCallback("Player", "monster_spawn1", "MonsterSpawn", true, 1); 
AddEntityCollideCallback("Player", "scaresound_1", "Portraitscare", true, 1); 
} 
void NewMap(string &in asParent , string &in asChild , int alState) 
{ 
SetPlayerSanity(100) 
} 
void StatueLeft(string &in asParent , string &in asChild , int alState) 
{ 
        PlaySoundAtEntity("", "react_scare", "Player", 0, false); 
        StartPlayerLookAt("armor_3", 0.4, 0.4, ""); 
} 
void StatueRight(string &in asParent , string &in asChild , int alState) 
{ 
        PlaySoundAtEntity("", "react_scare", "Player", 0, false); 
        StartPlayerLookAt("armor_6", 0.4, 0.4, ""); 
} 
void MonsterSpawn(string &in asParent , string &in asChild , int alState) 
{ 
        PlaySoundAtEntity("", "notice.snt", "Player", 0, false); 
        SetEntityActive("enemy_grunt1", true); 
        StartPlayerLookAt("enemy_grunt1", 0.4, 0.4, ""); 
} 
void Portraitscare(string &in asParent , string &in asChild , int alState) 
{ 
        PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false); 
        StartPlayerLookAt("scare_note1", 0.4, 0.4, ""); 
        GiveSanityDamage(20, true); 
} 
void OnLeave () 
{ 
}
 
Thanks all!
			  
			
			
 
			
		 |  
	 
 | 
 
	| 08-19-2011, 03:43 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Loading crashes with no errors 
			 
			
				I am almost certain the problem is somewhere in here: 
AddEntityCollideCallback("Player", "sanityrestore", "Newmap", true, 1); 
AddEntityCollideCallback("Player", "Leftstatuegasp", "StatueLeft", true, 1); 
AddEntityCollideCallback("Player", "Rightstatuegasp", "StatueRight", true, 1); 
AddEntityCollideCallback("Player", "monster_spawn1", "MonsterSpawn", true, 1); 
AddEntityCollideCallback("Player", "scaresound_1", "Portraitscare", true, 1);
 Comment out each one by one until you find the culprit.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 08-19-2011, 03:54 AM  | 
	
		
	 | 
 
 
	
		
		JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
RE: Loading crashes with no errors 
			 
			
				Anyone have some more ideas before I test "MyComputer's" idea?
			 
			
			
 
			
		 |  
	 
 | 
 
	| 08-19-2011, 10:35 PM  | 
	
		
	 | 
 
 
	
		
		JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
RE: Loading crashes with no errors 
			 
			
				Oh FFS... it was lack of a ";" after the sanity code... 
 
Thanks for the help Computer! 
 
(SOLVED)
			 
			
			
 
			
		 |  
	 
 | 
 
	| 08-20-2011, 05:58 AM  | 
	
		
	 | 
 
 
	 
 |