Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal Error :/
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#1
Fatal Error :/

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!
(This post was last modified: 11-11-2012, 02:24 PM by Rowzter.)
11-11-2012, 12:59 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Fatal Error :/

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 { }

Trying is the first step to success.
11-11-2012, 01:02 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#3
RE: Fatal Error :/

(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
11-11-2012, 01:05 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Fatal Error :/

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


I rate it 3 memes.
11-11-2012, 01:08 PM
Find
Rowzter Offline
Junior Member

Posts: 44
Threads: 12
Joined: Oct 2012
Reputation: 3
#5
RE: Fatal Error :/

Thx!! That worked!
11-11-2012, 01:16 PM
Find




Users browsing this thread: 1 Guest(s)