Frictional Games Forum (read-only)

Full Version: Why is my custom story not working!?!?!?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
hello users, i am experiencing a problem with my custom story, it says when i boot up, "Unexpected end of file" i am very, VERY new to coding, so i might have a obvious flaw somewhere, but i cannot find it, here it is:

///////////////////////
// Run when entering map
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallBack("Player", "PlayerCollide", MonsterFunction", true, 1);
AddEntityCollideCallBack("Player", "MonsterEnd", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alstate);
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");
}
//////////////////////
// Run when leaving map
void OnLeave()

if you can, please help me, i just want to make a little custom story is all.
///////////////////////
// Run when entering map
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallBack("Player", "PlayerCollide", MonsterFunction", true, 1);
AddEntityCollideCallBack("Player", "MonsterEnd", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alstate);
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");
}
//////////////////////
// Run when leaving map
void OnLeave()
{

}
///////////////////////
// Run when starting map
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "MonsterEnd", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");
}
//////////////////////
// Run when leaving map
void OnLeave()
{


}


Unearthlybrutal pls. There were some missing (") that you didn't notice.
^
Highlight the area you fixed next time please!

He fixed your AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1);
well a fatal error keeps telling me that at 11, ""void MonsterFunction(string &in asParent, string &in asChild, int alState);
{"" there's a unexpected token {, i'm VERY positive that's supposed to be there.
Did you fix up both errors that Unearthlybrutal & The Chaser pointed out?

And you should keep the grunt names exactly the same in the hps, the "G or g" in Grunt should be the same as the one in the your map also.
You placed a ; at the end that shouldn't be there. It should be:

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

{
alright, it says no matching sginatures to the callback's, odd. i went and checked if they matched perfectly, and they check out. but they still say there's no matching sigs. but, if i add that ; to void monsterfunction, it then says unexpected token.
(12-02-2012, 09:24 PM)Gamerlord08 Wrote: [ -> ]alright, it says no matching sginatures to the callback's, odd. i went and checked if they matched perfectly, and they check out. but they still say there's no matching sigs. but, if i add that ; to void monsterfunction, it then says unexpected token.
void OnStart()

{

PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);

AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);

AddEntityCollideCallback("Player", "MonsterEnd", "THERE IS A MISSING CALLBACK IN HERE" true, 1);

}



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

{

SetEntityActive("servant_grunt_1", true);

AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");

AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");

AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");

}

//////////////////////

// Run when leaving map

void OnLeave()

{





}
im sorry chaser, but i still don't understand what that means, i know there's a missing thing there, but what do i replace it with? what do i do with it? i have no clue why it dosen't work the way it is now, like i said, VERY new.

Alright, i changed it to this and added a callbackfunc to the monster, ///////////////////////
// Run when starting map
void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
AddEntityCollideCallback("Player", "MonsterEnd", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_Grunt_1", "PathNodeArea_3", 0, "");
}
//////////////////////
// Run when leaving map
void OnLeave()
{


}

but it still says no sig, WHY, there is a signature on the monster now!
Pages: 1 2