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
Fatal Error when starting my Costum Story
nikkel Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#1
Fatal Error when starting my Costum Story

Hello guys
im getting a FATAL Error while starting my Amnesia costum story.

FATAL ERROR:Could not load script file "costum_stories/Erster Costum Story Test/maps/ErsterTest.hpl
main (9,1):ERR : Expected "," or ";"
main (11,12) ERR : Expected identifier
main (21,1) ERR : Unexpected token ")"

The script is:

void OnEnter()
{
    AddUseItemCalback("", "Penis", "türeins", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in esEntity)
(
    SetSwingDoorLocked("türeins", false, true);
    RemoveItem("Penis");
)

and "extra_english.lang"

<LANGUGAGE>
    <CATOGORY Name="Test"
        <Entry Name="Description">Das ist ein Test</Entry>
    </CATAGORY>
    
    <CATERGORY Name="Journal"
        <Entry Name="Note_unbekanntenachricht_Name">Unbekannte Nachricht</Entry>
        <Entry Name="Note_unbekanntenachricht_Text">Unbekannte Nachricht[br]Testhere[/br]</Entry>
    </CATAGORY
    <CATAGORY Name="Inventory">
        <Entry Name="ItemName_Key">Penis</Entry>
        <Entry Name="ItemDesc_Key">PENIS!!!!!</Entry>
    </CATAGORY

    
</LANGUAGE>

Could someone help me please?
09-03-2011, 10:24 AM
Find
plutomaniac Offline
Super Moderator

Posts: 6,368
Threads: 45
Joined: May 2011
Reputation: 183
#2
RE: Fatal Error when starting my Costum Story

Moved to CS&M
09-03-2011, 12:42 PM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#3
RE: Fatal Error when starting my Costum Story

Use this:

void OnEnter()
{
    AddUseItemCalback("", "Penis", "türeins", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in esEntity)
{
    SetSwingDoorLocked("türeins", false, true);
    RemoveItem("Penis");
}

*Use brackets {} not parenthesis ()

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

09-03-2011, 04:06 PM
Website Find
nikkel Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2011
Reputation: 0
#4
RE: Fatal Error when starting my Costum Story

Thanks for this Smile
09-03-2011, 04:48 PM
Find
Gameristic34 Offline
Junior Member

Posts: 1
Threads: 0
Joined: Jun 2012
Reputation: 0
#5
RE: Fatal Error when starting my Costum Story

same problem but I just get a different error when i try the code and fill it in with my stuff?
I get this when i try to load my story: FATAL ERROR:Could not load script file "costum_stories/Test/Costum Story Test/maps/Test.hplmain (9,1):ERR : Expected "," or ";"

but my code is:
void OnEnter()
{
AddUseItemCalback("", "Key To Hallway", "LockedDoor_1", "unlock_door", true);
}


void unlock_door(string &in Key To Hallway, string &in LockedDoor_1)
{
SetSwingDoorLocked(LockedDoor_1, false, true);
PlaySoundAtEntity("", "unlock_door", LockedDoor_1, 0, false);
RemoveItem(Key To Hallway);
}
void OnLeave()
{
}


& the extra_English.lang:

<LANGUAGE>
<RESOURCES />
<CATEGORY Name="Inventory">
<Entry Name="Key to hallway">Key To Hallway</Entry>
<Entry Name="Key to hallway">Hallway Key</Entry>
</CATEGORY>
</LANGUAGE>

And i don't know what is wrong?
(This post was last modified: 06-01-2012, 07:40 AM by Gameristic34.)
06-01-2012, 07:39 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#6
RE: Fatal Error when starting my Costum Story

(9,1):ERR : Expected "," or ";"

To read errors like this in the future:
9 is the line the exception occurred,
1 is the place in the line that the exception occurred.

You haven't surrounded your LockedDoor_1 with quotes, as it is a string.
I noticed this in 2 places.

Also, do not change the parameters in the callback functions when you declare them:
void unlock_door(string &in asItem, string &in asEntity)

Also, Key To Hallway needs to be in quotes.

Dark Seclusion Here
(This post was last modified: 06-01-2012, 09:27 AM by FragdaddyXXL.)
06-01-2012, 09:19 AM
Find




Users browsing this thread: 2 Guest(s)