Frictional Games Forum (read-only)

Full Version: Fatal Error :/
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alraight, i got this fatal error:

FATAL ERROR: Could not load script file
'custom_stories/Venomdusk/custom_Stories/Venomdusk/maps/Dunge
on.hps'!
main (10,1) : ERR : Expected ',' or ';'


I guess it must have something to do with this:
',' or ';'

But i cant find something like that in my script, Here it is:
void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("servant_brute_2", "Brutedespawn_1", "MonsterDespawnFunc", true, 1);
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("Player", "ScaryCollide", "func_slam", true, 1);
}
void MonsterFunction(string &in asParent, string &in asChild, int alState)

void func_slam(string &in asParent, string &in asChild, int alState)

{
SetEntityActive("servant_brute_2", true);

AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_4", 0, "");


SetSwingDoorClosed("prison_section_5", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);




}

void MonsterDespawnFunc(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_brute_2", true);
}




If someone finds an error and know how to fix it would mean alot!
You have this line:
void MonsterFunction(string &in asParent, string &in asChild, int alState)



but there is no { }


This doesn't make sense.
A void line always has { }
(11-11-2012, 01:02 PM)beecake Wrote: [ -> ]You have this line:
void MonsterFunction(string &in asParent, string &in asChild, int alState)



but there is no { }


This doesn't make sense.
A void line always has { }
The monsterfunc works without problems, But the slamdoor func i added in my script makes the error i think, but i don't know how to fix or what im missing
To clarify:

Spoiler below!


void OnStart()
{
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("servant_brute_2", "Brutedespawn_1", "MonsterDespawnFunc", true, 1);
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("Player", "ScaryCollide", "func_slam", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_brute_2", true);
AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_4", 0, "");
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("prison_section_5", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void MonsterDespawnFunc(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_brute_2", true);
}

Thx!! That worked!