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 Another FATAL ERROR problem :/
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#1
Another FATAL ERROR problem :/

Ok, trying to get back into scripting for this game for a Uni Project and went onto this tutorial;
http://www.youtube.com/watch?v=M5x_taEkP...ata_player


Did it all but I keep getting this error and I have no idea why

FATAL ERROR: Could not load script file
'custom_stories/ExampleStory/maps/01_Scripting_Tutorial.hps'"
main (7, 28): ERR : Expected '('
main (13, 22) ERR: Expected '('

Here is the script;


void OnStart()
{
{
AddEntityCollideCallback("Player", "RoomTwoArea_01", "CollideRoomTwo", true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState);
{
SetSwingDoorClosed("castle_arched01_1", true, true);
StartPlayerLookAt("castle_arched01_1", 10.0, 10.0, "");
AddTimer("", 1.0, "StopLook");
}
void StopLook(string &in asTimer);
{
StopPlayerLookAt();
}
}



I've tried all I can, I keep looking through it and searched online but can't find a solution :/ Halp?

Thanks.
08-17-2012, 12:26 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Another FATAL ERROR problem :/

You had extra open/closed brackets; also, 10 is very fast for the player look function, 2-3 is fast enough:


void OnStart()
{
AddEntityCollideCallback("Player", "RoomTwoArea_01", "CollideRoomTwo", true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState);
{
SetSwingDoorClosed("castle_arched01_1", true, true);
StartPlayerLookAt("castle_arched01_1", 1.5f, 2.0f, "");
AddTimer("", 1.0f, "StopLook");
}

void StopLook(string &in asTimer);
{
StopPlayerLookAt();
}

I rate it 3 memes.
08-17-2012, 12:31 AM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#3
RE: Another FATAL ERROR problem :/

Now it just says;

FATAL ERROR: Could not load script file
'custom_stories/ExampleStory/maps/01_Scripting_Tutorial.hps'"
main (7, 1): ERR : Unexpected token '{'
main (14, 1) ERR: Unexpected token '{'
08-19-2012, 08:18 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#4
RE: Another FATAL ERROR problem :/

void OnStart()
{
AddEntityCollideCallback("Player", "RoomTwoArea_01", "CollideRoomTwo", true, 1);
}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("castle_arched01_1", true, true);
StartPlayerLookAt("castle_arched01_1", 1.5f, 2.0f, "");
AddTimer("", 1.0f, "StopLook");
}

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}

There were two semicolons at the end of the function header which shouldn't have been there.
(This post was last modified: 08-19-2012, 08:39 PM by Ongka.)
08-19-2012, 08:39 PM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#5
RE: Another FATAL ERROR problem :/

That did it, thanks! Forgot how tough this was :/
08-19-2012, 08:59 PM
Find




Users browsing this thread: 2 Guest(s)