Hi! I've been inspired by PewDiePies adventures in various custom maps to create my own one and I have this perfect story I want to deliver! I was very proud of my first area in my custom map when I wanted to make a door, which required a key. The scripting went fine at first (note: this is my first attempt at coding, ever) untill some horrible error sign showed up, which I can't get rid of.
Im sure something somewhere went wrong in my coding but I can't find it!
The error message is: "FATAL ERROR; could not load script customstories/Haunted/maps/Haunted.hps ERR: Expected '('
And I dont understand the .lang and .hps files. I have my extra_english.lang in customstories/haunted and TWO .hps files in customstories/haunted/maps
Please help me!
This is what my Haunted.hps looks like:
My Haunted.hps looks like this:
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "firstkey_1", "firstdoor_1", "Usedfirstkey_1", true);
}
void Usedfirstkey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("firstdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "firstdoor_1", 0, false);
RemoveItem("firstkey_1");
AddDebugMessage("Wrong", false);
}
void OnEnter()
{
}
void OnLeave
{
}
My Haunted.hps looks like this:
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "firstkey_1", "firstdoor_1", "Usedfirstkey_1", true);
}
void Usedfirstkey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("firstdoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "firstdoor_1", 0, false);
RemoveItem("firstkey_1");
AddDebugMessage("Wrong", false);
}
void OnEnter()
{
}
void OnLeave
{
}
[/quote]
My extra_english.lang:
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">You've just woken up and you don't know who you are, or where you are.[br]A note has been left, containing the very last few words of a mans life. Who was he?[br]It all starts from there. Good luck.</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_letterone_Name">Greg, 1922</Entry>
<Entry Name="Note_letterone_Text">I can't stand this. Can't stand none of it.[br]Im sick and tired of all the flaws in this life.[br]I feel dirty. I still hear their screams and I still can't wash of the blood on my hands.[br]Farewell</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemName_firstkey">Simple Key</Entry>
<Entry Name="ItemDesc_firstkey">A normal simple key, probably unlocks a wooden door.</Entry>
</CATEGORY>
</LANGUAGE>
And my second .hps file:
<CATEGORY Name="Journal">
<Entry Name="Note_Name_Name">Title</Entry>
<Entry Name="Note_Name_Text">Text</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemName_name">Name</Entry>
<Entry Name="ItemDesc_name">Name</Entry>
</CATEGORY>