| 
		
	
		| Ianlis   Junior Member
 
 Posts: 10
 Threads: 4
 Joined: Jan 2011
 Reputation: 
0
 | 
			| Map 2 FATAL ERROR 
 
				Every time I open the second door of my level, it gives me an error: FATAL ERROR. Could not load script file 'custom_stories/Escape/main/C:/Program Files (x86)/Amnesia - The Dark Descent/redist/custom stories/Escape/main/escape2.hps'! ExecuteString(1, 1):ERR:No matching signatures to 'OnLeave() main(4, 1):ERR:Expected';'
 
 Here's my code:
 
 void OnStart()
 {
 AddEntityCollideCallback("Player" , "EnemySpawner" , "Monsterfunc1" , true , 1)
 }
 void MonsterFunc1(string &in asParent , string &in asChild , int alState)
 {
 SetEntityActive("servant_grunt" , true);
 }
 
 
 
 
 I'm at an odds on what to do.
 |  |  
	| 01-22-2011, 08:57 PM |  |  
	
		| Shev   Member
 
 Posts: 238
 Threads: 25
 Joined: Dec 2010
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				You need a ;  (01-22-2011, 08:57 PM)Ianlis Wrote:  Every time I open the second door of my level, it gives me an error: FATAL ERROR. Could not load script file 'custom_stories/Escape/main/C:/Program Files (x86)/Amnesia - The Dark Descent/redist/custom stories/Escape/main/escape2.hps'! ExecuteString(1, 1):ERR:No matching signatures to 'OnLeave() main(4, 1):ERR:Expected';'
 
 Here's my code:
 
 void OnStart()
 {
 AddEntityCollideCallback("Player" , "EnemySpawner" , "Monsterfunc1" , true , 1) <- right here
 }
 void MonsterFunc1(string &in asParent , string &in asChild , int alState)
 {
 SetEntityActive("servant_grunt" , true);
 }
 
 
 
 
 I'm at an odds on what to do.
 i spam meme 4 raeg |  |  
	| 01-22-2011, 09:12 PM |  |  
	
		| Ianlis   Junior Member
 
 Posts: 10
 Threads: 4
 Joined: Jan 2011
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				Thanks, it worked. Now the second problem is that I can't seem to get the enemy to spawn when i walk across 'EnemySpawner'.
			 |  |  
	| 01-22-2011, 09:38 PM |  |  
	
		| Robby   Posting Freak
 
 Posts: 2,549
 Threads: 38
 Joined: Jun 2009
 Reputation: 
47
 | 
			| RE: Map 2 FATAL ERROR 
 
				Check if the enemy has the exact same name as in the script. If it is "servant_grunt_1", then, you must type in the script "servant_grunt_1". Or check if the ScriptArea has the name of "EnemySpawner", and not something else.
			 
 Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active. |  |  
	| 01-22-2011, 09:41 PM |  |  
	
		| Ianlis   Junior Member
 
 Posts: 10
 Threads: 4
 Joined: Jan 2011
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				 (01-22-2011, 09:41 PM)Nemet Robert Wrote:  Check if the enemy has the exact same name as in the script. If it is "servant_grunt_1", then, you must type in the script "servant_grunt_1". Or check if the ScriptArea has the name of "EnemySpawner", and not something else. 
Still nothing.
			 |  |  
	| 01-22-2011, 09:46 PM |  |  
	
		| Shev   Member
 
 Posts: 238
 Threads: 25
 Joined: Dec 2010
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				Instead of spawn, change it so the monsters already there except its inactive, and then the script activates it.
			 
 i spam meme 4 raeg |  |  
	| 01-22-2011, 11:50 PM |  |  
	
		| Ianlis   Junior Member
 
 Posts: 10
 Threads: 4
 Joined: Jan 2011
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				 (01-22-2011, 11:50 PM)Shev Wrote:  Instead of spawn, change it so the monsters already there except its inactive, and then the script activates it. 
How do you do that?
			 |  |  
	| 01-23-2011, 02:55 AM |  |  
	
		| Shev   Member
 
 Posts: 238
 Threads: 25
 Joined: Dec 2010
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				 (01-23-2011, 02:55 AM)Ianlis Wrote:   (01-22-2011, 11:50 PM)Shev Wrote:  Instead of spawn, change it so the monsters already there except its inactive, and then the script activates it. How do you do that?
 
Put the monster in the level editor, and uncheck the Active box.
 
Then put this in.
 
SetEntityActive(monsternamehere, 1 or 0);
			 
 i spam meme 4 raeg |  |  
	| 01-23-2011, 07:54 AM |  |  
	
		| Pandemoneus   Senior Member
 
 Posts: 328
 Threads: 2
 Joined: Sep 2010
 Reputation: 
0
 | 
			| RE: Map 2 FATAL ERROR 
 
				You might also want to change 'Monsterfunc1' to 'MonsterFunc1' in your AddEntityCollideCallback, but I am not sure whether it is case sensitive.
			 
 
				
(This post was last modified: 01-23-2011, 01:38 PM by Pandemoneus.)
 |  |  
	| 01-23-2011, 01:37 PM |  |  |