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
Script Help Script error
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#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
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
RE: Script error

Post the script?

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-30-2012, 10:56 AM
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#3
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
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
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
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#5
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
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#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

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
(This post was last modified: 01-30-2012, 11:15 AM by Tripication.)
01-30-2012, 11:13 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#7
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
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#8
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
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#9
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?


Current - Castle Darkuan
Other - F*cked Map
01-30-2012, 11:48 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#10
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
Find




Users browsing this thread: 1 Guest(s)