Frictional Games Forum (read-only)
Amnesia Custom Story Error [Help] - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Hints, help and spoilers (https://www.frictionalgames.com/forum/forum-34.html)
+--- Thread: Amnesia Custom Story Error [Help] (/thread-29630.html)



Amnesia Custom Story Error [Help] - LemoN123SVK - 02-19-2015

PHP Code:
void OnStart()
{
    
AddEntityCollideCallback("Player""ScriptArea_2""uvezen"true1);
    
AddEntityCollideCallback("Player""ScriptArea_3""utek"true1);
    
AddEntityCollideCallback("Player""ScriptArea_4""DoorExplode"true1);
    
AddEntityCollideCallback("Player""ScriptArea_5""Suitor"true1);
    
AddUseItemCallback("""hollow_needle_1""cellar_wood01_2""Dvere"true);
    
AddUseItemCallback("""crowbar_1""cellar_wood01_3""Dvere1"true);
    
AddEntityCollideCallback("Player""ScriptArea_6""SuitorUtek"true1);
    
AddEntityCollideCallback("Player""ScriptArea_7""Room"true1);
    
SetEntityPlayerInteractCallback("button_simple_1""ButtonFunc"true);
    
AddEntityCollideCallback("Player""ScriptArea_8""Room1"true1);
    
AddEntityCollideCallback("Player""ScriptArea_10""Exit"true1);
    
AddEntityCollideCallback("Player""ScriptArea_12""Suitor1"true1);
}

void Exit(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetEntityActive("sewer_grate_broken_1"true);
     
AddQuest("prohledat","prohledat");
}


void Suitor(stringasTextCategorystringasTextEntryfloat afTime)
{

     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_1"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_2"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_3"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_4"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_6"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_7"1"");
     
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_8"1"");
     
SetEntityActive("servant_grunt_1"true);
     
GiveSanityDamage(5.0ftrue);
     
SetMessage("TheVoice""00_04"0);
     
AddQuest("roomutek","roomutek");
     
CheckPoint(“newcheckpoint”“PlayerStartArea_3”“Happening”“DeathCategory”“Deathtext1”); 
}

void Suitor1(stringasTextCategorystringasTextEntryfloat afTime)
{

     
SetEntityActive("servant_grunt_1"true);

}

void ButtonFunc(string &in asEntity)
{
   
SetEntityActive("sewer_grate_new_1"false);
   
SetEntityActive("sewer_grate_broken_1"true);
   
PlaySoundAtEntity("Mechanism1""move_gate""button_simple_1"0false);
   
AddTimer(""3.0f"ButtonFunc2");
}

void ButtonFunc2(string &in asTimer)
{
   
StopSound("Mechanism1"3.0f);
}

void Room(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetSwingDoorLocked("mansion_1"truetrue);
     
AddQuest("prohledat","prohledat");
}

void Room1(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetSwingDoorLocked("cellar_wood01_4"truetrue);
     
SetEntityActive("servant_brute_2"false);
}

void SuitorUtek(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetSwingDoorLocked("cellar_wood01_3"truetrue);
     
SetEntityActive("servant_grunt_1"false);
}

void DoorLockedPlayer1(string &in entity)
 
{
    if(
GetSwingDoorLocked("cellar_wood01_2") == true)
    {
 
        
SetMessage("Messages""lock7"0);
 
    }
}

void DoorLockedPlayer4(string &in entity)
 
{
    if(
GetSwingDoorLocked("cabinet_simple_1") == true)
    {
 
        
SetMessage("Messages""lock10"0);
 
    }
}


void DoorLockedPlayer2(string &in entity)
 
{
    if(
GetSwingDoorLocked("cellar_wood01_3") == true)
    {
 
        
SetMessage("Messages""lock8"0);
 
    }
}

void DoorLockedPlayer3(string &in entity)
 
{
    if(
GetSwingDoorLocked("cellar_wood01_3") == true)
    {
 
        
SetMessage("Messages""lock9"0);
 
    }
}

void Dvere1(string &in asItemstring &in asEntity)
{
     
SetSwingDoorLocked("cellar_wood01_3"falsetrue);
     
PlaySoundAtEntity("""unlock_door""cellar_wood01_3"0false);
     
RemoveItem("crowbar_1");
}


void Dvere(string &in asItemstring &in asEntity)
{
     
SetSwingDoorLocked("cellar_wood01_2"falsetrue);
     
PlaySoundAtEntity("""unlock_door""cellar_wood01_2"0false);
     
RemoveItem("hollow_needle_1");
}


void DoorExplode(string &in asParentstring &in asChildint alState)
{
    
SetPropHealth("cellar_wood01_1"0.0f);
    
GiveSanityDamage(5.0ftrue);
}

void uvezen(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetSwingDoorLocked("dvere"truetrue);
     
PlaySoundAtEntity("""lock_door""dvere"0false);
     
SetEntityActive("servant_brute_1"true);
     
GiveSanityDamage(60.0ftrue);
     
SetMessage("TheVoice","00_02",9.0);
     
AddQuest("sklepeniutek","sklepeniutek");
     
StartPlayerLookAt("dvere"33"");
     
AddTimer("Timerw"5"Timer1");
}

void utek(stringasTextCategorystringasTextEntryfloat afTime)
{
     
SetEntityActive("servant_brute_1"false);
     
SetMessage("TheVoice","00_03",9.0);
     
AddQuest("sklepenistoky","sklepenistoky");
}


void Timer1(string &in asEntity)
{
    
StopPlayerLookAt();
    
StartPlayerLookAt("hatch_drainage_1"22"");
    
AddTimer("Timer"5"Timer2");
}

void Timer2(string &in asEntity)
{
    
StopPlayerLookAt();

}


void OnEnter()
{
    
AddQuest("sklepenivstup","sklepenivstup");
}

void OnLeave()
{



I cannot find the right error. Please find that error and tell me... Thank you..

ERROR: Expected Expression value


RE: Amnesia Custom Story Error [Help] - 7heDubz - 02-19-2015

What are the two numbers it gave you?
(x,y)

x = Line
Y = Character over from the left where error occurred.


RE: Amnesia Custom Story Error [Help] - Romulator - 02-20-2015

Most of your entity collide callback syntaxes are wrong when being used in the "void" lines.

Instead of:
PHP Code:
(stringasTextCategorystringasTextEntryfloat afTime
Use:
PHP Code:
(string &in asParentstring &in asChildint alState

This is only for the AddEntityCollideCallback syntaxes which are later in the void sections. Nowhere else.
There may be more errors, so fix all of these, and then run the game again, but like 7heDubz above me said, tell us what your error says.