Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FATAL ERROR
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#1
Photo  FATAL ERROR

Can someone please help??

I keep getting this error:[attachment=1622]
(This post was last modified: 07-03-2011, 06:28 AM by Zypherzemus.)
07-02-2011, 07:23 AM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#2
RE: FATAL ERROR

Please show uss your script file (Dormitry.hps). The problem is inside of it.

[Image: 44917299.jpg]Dubstep <3
07-02-2011, 08:14 AM
Find
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#3
RE: FATAL ERROR

/////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("12_amb.ogg", true, 100.0, 0.0, 1, true);
}

{
AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest", true, 1);
void GetKeyQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("keyquest", "KeyQuest");
}
AddEntityCollideCallback("Player", "Key_Complete_Area", "FinishKeyQuest", true, 1);
void FinishKeyQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("keyquest", "KeyQuest");
}

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "eastwingkey_1", "eastwingdoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("eastwingdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "eastwingdoor", 0, false);
RemoveItem("eastwingkey_1");
}





////////////////////////////
// Run when leaving map
void OnLeave()
{

}








I kinda edited it to see if I could fix the problem on my own. That's why it looks like so.

Now the Error is: main (8,1): ERR: Unexpected token '{'
(This post was last modified: 07-02-2011, 08:46 AM by Zypherzemus.)
07-02-2011, 08:38 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#4
RE: FATAL ERROR

{ is being used to open code blocks and } is used to close those blocks. Every block need to have a name, which means you cannot do something like this

{
something
}

You have to do like this

void SomeFunction( SomeInput)
{
something
}

Also, your collide and use call backs need to be in OnStart block.

(This post was last modified: 07-02-2011, 11:04 AM by Tanshaydar.)
07-02-2011, 11:04 AM
Website Find
finosi Offline
Junior Member

Posts: 8
Threads: 1
Joined: Jun 2011
Reputation: 0
#5
RE: FATAL ERROR

And remember, it is easier for you if you edit the script while the map is open

Like it says here http://wiki.frictionalgames.com/hpl2/tut...t_beginner in :

"Open the Map in Amnesia BEFORE you Edit Script!"

07-02-2011, 04:40 PM
Find
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#6
RE: FATAL ERROR

Thanks guys, I got it to work again.. But I just ran into another error >:/

FATAL ERROR

main: (24,1): ERR: No matching signatures to:
'SetPlayerLookAt(string@&, const float, const float, string@&);

/////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("07_amb.ogg", true, 100.0, 0.0, 1, true);
AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest", true, 1);
AddEntityCollideCallback("Player", "Key_Complete_Area", "FinishKeyQuest", true, 1);
AddEntityCollideCallback("Player", "Grunt_Area", "CollideGruntDoor", true, 1);
}

void GetKeyQuest(string &in asParent, string &in asChild, int alState)
{
AddQuest("keyquest", "KeyQuest");
}

void FinishKeyQuest(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("keyquest", "KeyQuest");
}

void CollideGruntDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("eastwingdoor", true, true);
SetPlayerLookAt("eastwingdoor", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}
void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "eastwingkey_1", "eastwingdoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("eastwingdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "eastwingdoor", 0, false);
RemoveItem("eastwingkey_1");
}




////////////////////////////
// Run when leaving map
void OnLeave()
{

}



I'm sorry if this is getting annoying in any way, I'm 'kinda' new to this, I took scripting classes (somewhat) over the summer a few years ago and completely forgot everything :P so yeah. Thanks for the help!
(This post was last modified: 07-02-2011, 08:07 PM by Zypherzemus.)
07-02-2011, 08:06 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#7
RE: FATAL ERROR

SetPlayerLookAt("eastwingdoor", 10.0f, 10.0f, ""); should be
StartPlayerLookAt("eastwingdoor", 10.0f, 10.0f, "");
07-02-2011, 08:15 PM
Find
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#8
RE: FATAL ERROR

PHP Code: (Select All)
/////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("07_amb.ogg"true100.00.01true);
 
AddEntityCollideCallback("Player""Key_Quest_Area""GetKeyQuest"true1);
 
AddEntityCollideCallback("Player""Key_Complete_Area""FinishKeyQuest"true1);
 
AddEntityCollideCallback("Player""Grunt_Area""CollideGruntDoor"true1);
}

void GetKeyQuest(string &in asParentstring &in asChildint alState)
{
AddQuest("keyquest""KeyQuest");
}

void FinishKeyQuest(string &in asParentstring &in asChildint alState)
{
CompleteQuest("keyquest""KeyQuest");
}

void CollideGruntDoor(string &in asParentstring &in asChildint alState)
{
SetSwingDoorClosed("eastwingdoor"truetrue);
StartPlayerLookAt("eastwingdoor"10.0f10.0f"");
AddTimer(""2.0f"stoplook");
CreateEntityAtArea("grunt_1""servant_grunt.ent""Grunt_Area_2"truefalse);
ShowEnemyPlayerPosition("grunt_1");
GiveSanityDamage(0.0f50.0ftruefalse);
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("""eastwingkey_1""eastwingdoor""UsedKeyOnDoor"true);
}

void UsedKeyOnDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("eastwingdoor"falsetrue);
    
PlaySoundAtEntity("""unlock_door""eastwingdoor"0false);
    
RemoveItem("eastwingkey_1");
}



 
////////////////////////////
// Run when leaving map
void OnLeave()
{
 


'No matching signatures'
signatures don't match?




I honestly believe this .hps file hates my guts .-.
07-02-2011, 10:00 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#9
RE: FATAL ERROR

No matching signatures means that you either spelled or typed something wrong. For example: Playmusic instead of PlayMusic or that you are missing a boolean value/integer/string/float somewhere. in a command.

AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest"); would give an error as it should have two more columns, for example.
07-02-2011, 11:06 PM
Find
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#10
RE: FATAL ERROR

(07-02-2011, 11:06 PM)Roenlond Wrote: No matching signatures means that you either spelled or typed something wrong. For example: Playmusic instead of PlayMusic or that you are missing a boolean value/integer/string/float somewhere. in a command.

AddEntityCollideCallback("Player", "Key_Quest_Area", "GetKeyQuest"); would give an error as it should have two more columns, for example.

I understand that now, but as I looked over the script, I couldn't find anything wrong, if anything, it would most likely be the floats in row 26 and 28 since that's where the error ocurred. Huh
07-02-2011, 11:31 PM
Find




Users browsing this thread: 7 Guest(s)