Gamerlord08
Junior Member
Posts: 8
Threads: 1
Joined: Dec 2012
Reputation:
0
|
Why is my custom story not working!?!?!?
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.
|
|
12-02-2012, 04:55 PM |
|
Unearthlybrutal
Posting Freak
Posts: 775
Threads: 12
Joined: May 2011
Reputation:
26
|
RE: Why is my custom story not working!?!?!?
///////////////////////
// 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()
{
}
|
|
12-02-2012, 05:14 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Why is my custom story not working!?!?!?
///////////////////////
// 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.
THE OTHERWORLD (WIP)
Aculy iz dolan.
(This post was last modified: 12-02-2012, 06:20 PM by The chaser.)
|
|
12-02-2012, 06:20 PM |
|
Rapture
Posting Freak
Posts: 1,078
Threads: 79
Joined: May 2011
Reputation:
30
|
RE: Why is my custom story not working!?!?!?
^
Highlight the area you fixed next time please!
He fixed your AddEntityCollideCallBack("Player", "PlayerCollide", "MonsterFunction", true, 1);
|
|
12-02-2012, 08:00 PM |
|
Gamerlord08
Junior Member
Posts: 8
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: Why is my custom story not working!?!?!?
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.
(This post was last modified: 12-02-2012, 08:55 PM by Gamerlord08.)
|
|
12-02-2012, 08:39 PM |
|
Rapture
Posting Freak
Posts: 1,078
Threads: 79
Joined: May 2011
Reputation:
30
|
RE: Why is my custom story not working!?!?!?
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.
|
|
12-02-2012, 09:00 PM |
|
Damascus
Senior Member
Posts: 646
Threads: 118
Joined: Mar 2012
Reputation:
29
|
RE: Why is my custom story not working!?!?!?
You placed a ; at the end that shouldn't be there. It should be:
void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
|
|
12-02-2012, 09:23 PM |
|
Gamerlord08
Junior Member
Posts: 8
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: Why is my custom story not working!?!?!?
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.
(This post was last modified: 12-02-2012, 09:35 PM by Gamerlord08.)
|
|
12-02-2012, 09:24 PM |
|
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
|
RE: Why is my custom story not working!?!?!?
(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()
{
}
THE OTHERWORLD (WIP)
Aculy iz dolan.
|
|
12-02-2012, 09:55 PM |
|
Gamerlord08
Junior Member
Posts: 8
Threads: 1
Joined: Dec 2012
Reputation:
0
|
RE: Why is my custom story not working!?!?!?
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!
(This post was last modified: 12-02-2012, 10:51 PM by Gamerlord08.)
|
|
12-02-2012, 10:22 PM |
|
|