Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
Script error
Hey guys, I just started making my first custom story, and when I tried launching my story for the first time, I got an error saying this:
FATAL ERROR: Could not load script file 'custom_stories/Calling Dr/maps/Map1.hps!
main(15, 2) : Err : Unexpected end of file.
Plz, could anyone advice me here?
(This post was last modified: 01-30-2012, 10:55 AM by Saren.)
|
|
01-30-2012, 10:55 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Script error
Post the script?
|
|
01-30-2012, 10:56 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: Script error
What script? It was a pop up saying there's an error with my first map file. And honestly, I don't know what's wrong with it..
|
|
01-30-2012, 11:03 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script error
Post the Map1.hps file with your scripts in it. How are we supposed to know what's wrong if we don't know what you put in the file?
|
|
01-30-2012, 11:04 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: Script error
Ah sry xD
Here:
void OnStart()
{
AddEntityCollideCallback("Player", "Get_to_work_Area", "GetFirst_Quest", True, 1);
AddEntityCollideCallback("Player", "Get_to_Work_complete_Area", "FinishFirst_Quest", True, 1);
}
void GetGet_to_workQuest(string &in asParent, string &in asChild, int alState
{
AddQuest("get_to_workquest", "Get_To_Work");
}
void FinishGet_to_workQuest(string &in asParent, string &in asChild, int alState
{
CompleteQuest("get_to_workquest", "Get_To_Work");
}
|
|
01-30-2012, 11:09 AM |
|
Tripication
Member
Posts: 172
Threads: 19
Joined: Dec 2011
Reputation:
6
|
RE: Script error
void OnStart()
{
AddEntityCollideCallback("Player", "Get_to_work_Area", "GetFirst_Quest", true, 1);
AddEntityCollideCallback("Player", "Get_to_Work_complete_Area", "FinishFirst_Quest", true, 1);
}
void GetGet_to_workQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("get_to_workquest", "Get_To_Work");
}
void FinishGet_to_workQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("get_to_workquest", "Get_To_Work");
}
Just needed to close off the syntax's Here you go^
And true and false are always all lower case
(This post was last modified: 01-30-2012, 11:15 AM by Tripication.)
|
|
01-30-2012, 11:13 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script error
You are not naming things right. Use this:
void OnStart()
{
AddEntityCollideCallback("Player", "Get_to_work_Area", "GetFirst_Quest", true, 1);
AddEntityCollideCallback("Player", "Get_to_Work_complete_Area", "FinishFirst_Quest", true, 1);
}
void GetFirst_Quest(string &in asParent, string &in asChild, int alState)
{
AddQuest("get_to_workquest", "Get_To_Work");
}
void FinishFirst_Quest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("get_to_workquest", "Get_To_Work");
}
Use that and then look at the differences between your script and the modified script and figure out why your's didn't work.
|
|
01-30-2012, 11:17 AM |
|
Saren
Member
Posts: 196
Threads: 20
Joined: Jan 2012
Reputation:
1
|
RE: Script error
Much thx, gonna see if that helped
EDIT: It did.... I see I just forgot the last 2 )'s.... how silly of me, haha
(This post was last modified: 01-30-2012, 11:25 AM by Saren.)
|
|
01-30-2012, 11:21 AM |
|
Shadowfied
Senior Member
Posts: 261
Threads: 34
Joined: Jul 2010
Reputation:
5
|
RE: Script error
(01-30-2012, 11:17 AM)flamez3 Wrote: You are not naming things right. Use this:
void OnStart()
{
AddEntityCollideCallback("Player", "Get_to_work_Area", "GetFirst_Quest", true, 1);
AddEntityCollideCallback("Player", "Get_to_Work_complete_Area", "FinishFirst_Quest", true, 1);
}
void GetFirst_Quest(string &in asParent, string &in asChild, int alState)
{
AddQuest("get_to_workquest", "Get_To_Work");
}
void FinishFirst_Quest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("get_to_workquest", "Get_To_Work");
}
Use that and then look at the differences between your script and the modified script and figure out why your's didn't work. Are you saying there were more errors than the two missing parenthesis?
|
|
01-30-2012, 11:48 AM |
|
flamez3
Posting Freak
Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation:
57
|
RE: Script error
Yep, the function names are not the same as he/she defined them in void OnStart, and the true's were capitalized.
|
|
01-30-2012, 11:51 AM |
|
|