The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Problems with coding / scripting for my custom story
flakeguy Offline
Junior Member

Posts: 3
Threads: 1
Joined: Oct 2011
Reputation: 0
#1
Problems with coding / scripting for my custom story

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. Angry

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! Big Grin


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>

(This post was last modified: 10-17-2011, 06:05 PM by flakeguy.)
10-17-2011, 06:03 PM
Find


Messages In This Thread
Problems with coding / scripting for my custom story - by flakeguy - 10-17-2011, 06:03 PM



Users browsing this thread: 2 Guest(s)