Frictional Games Forum (read-only)
Map 2 FATAL ERROR - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Map 2 FATAL ERROR (/thread-6334.html)



Map 2 FATAL ERROR - Ianlis - 01-22-2011

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.


RE: Map 2 FATAL ERROR - Shev - 01-22-2011

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.



RE: Map 2 FATAL ERROR - Ianlis - 01-22-2011

Thanks, it worked. Now the second problem is that I can't seem to get the enemy to spawn when i walk across 'EnemySpawner'.


RE: Map 2 FATAL ERROR - Robby - 01-22-2011

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.


RE: Map 2 FATAL ERROR - Ianlis - 01-22-2011

(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.


RE: Map 2 FATAL ERROR - Shev - 01-22-2011

Instead of spawn, change it so the monsters already there except its inactive, and then the script activates it.


RE: Map 2 FATAL ERROR - Ianlis - 01-23-2011

(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?


RE: Map 2 FATAL ERROR - Shev - 01-23-2011

(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);


RE: Map 2 FATAL ERROR - Pandemoneus - 01-23-2011

You might also want to change 'Monsterfunc1' to 'MonsterFunc1' in your AddEntityCollideCallback, but I am not sure whether it is case sensitive.