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
Amnesia Custom Story Error [Help]
LemoN123SVK Offline
Junior Member

Posts: 1
Threads: 1
Joined: Feb 2015
Reputation: 0
#1
Amnesia Custom Story Error [Help]

PHP Code: (Select All)
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
02-19-2015, 06:10 PM
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#2
RE: Amnesia Custom Story Error [Help]

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

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

02-19-2015, 08:42 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Amnesia Custom Story Error [Help]

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

Instead of:
PHP Code: (Select All)
(stringasTextCategorystringasTextEntryfloat afTime
Use:
PHP Code: (Select All)
(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.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 02-20-2015, 03:39 AM by Romulator.)
02-20-2015, 03:38 AM
Find




Users browsing this thread: 1 Guest(s)