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
Need Help with credits.
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#1
Need Help with credits.

Ok, so I set my credits to its own map and have it so the player will spawn on an area and it will start the credits, anyway here is my script for it:
Spoiler below!
////////////////////////////// Run when entering map
void OnStart()
//OnEnter
{
AddEntityCollideCallback("Player", "ending_area", "StartCredits", true, 1);
}
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)
{
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");
}

// Run when leaving map
void OnLeave()
{

}

also, the error message I'm receiving when the game crashes is this:
Spoiler below!
main (7,1) : ERR : A function with the same name and parameters already exist
main (9,2) :ERR: No matching signatures to 'StartCredits(string@&, constbool, string@&, string@&, string@&)'

If you need anymore information, just tell me, and thanks for any help in advance.

10-17-2011, 09:28 PM
Find
schmupper Offline
Junior Member

Posts: 23
Threads: 1
Joined: Aug 2011
Reputation: 2
#2
RE: Need Help with credits.

void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)


should be:

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


''Oh. My. God. He's DEAD. Quickly, if he hasnt started to smell, give him the kiss of life!''

Clarence - The monkey hater
10-17-2011, 09:46 PM
Find
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#3
RE: Need Help with credits.

(10-17-2011, 09:46 PM)schmupper Wrote:
void StartCredits(string& asMusic, bool abLoopMusic, string& asTextCat, string& asTextEntry, int alEndNum)


should be:

void StartCredits(string &in asParent, string &in asChild, int alState)
That seemed to work for the first error, but I'm still getting the second error in (9,2).

10-18-2011, 08:46 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Need Help with credits.

(10-18-2011, 08:46 PM)A Tricky Carnie Wrote: That seemed to work for the first error, but I'm still getting the second error in (9,2).

For the HPL2 StartCredits function, you're supposed to provide an integer for the last parameter, not a string.

Tutorials: From Noob to Pro
10-18-2011, 09:04 PM
Website Find
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#5
RE: Need Help with credits.

(10-18-2011, 09:04 PM)Your Computer Wrote:
(10-18-2011, 08:46 PM)A Tricky Carnie Wrote: That seemed to work for the first error, but I'm still getting the second error in (9,2).

For the HPL2 StartCredits function, you're supposed to provide an integer for the last parameter, not a string.
so I should change the last @&string to a @&int?

10-18-2011, 09:08 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Need Help with credits.

(10-18-2011, 09:08 PM)A Tricky Carnie Wrote: so I should change the last @&string to a @&int?

Simply remove the quotation marks around the number 1 from:
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");

Tutorials: From Noob to Pro
10-18-2011, 09:16 PM
Website Find
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#7
RE: Need Help with credits.

(10-18-2011, 09:16 PM)Your Computer Wrote:
(10-18-2011, 09:08 PM)A Tricky Carnie Wrote: so I should change the last @&string to a @&int?

Simply remove the quotation marks around the number 1 from:
StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", "1");
Oh, thanks, didn't realize those didnt belong there.



10-18-2011, 09:27 PM
Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#8
RE: Need Help with credits.

Hi I'm trying this script atm. but it gives me an error message:

main(198,1) : ERR : Unexpected token '{'


void OnStart()
{
AddEntityCollideCallback("Player", "Ending_Area_1", "StartCredits", true, 1);
}

"197" void StartCredits(string &in asParent, string &in asChild, int alState);
"198" {
"199" StartCredits("05_paper_transformation.ogg", true, "Ending", "MainCredits", 1);
"200" }

Help plox so close to wrapping my custom story up.
10-19-2011, 06:40 PM
Find




Users browsing this thread: 5 Guest(s)