Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when testing my map
Author Message
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #1
Error when testing my map

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("prisonkey_1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);

I got an error said: "FATAL ERROR: Could not load script file 'custom_stories/My First Story/maps/Test.hps! main (27,45):ERR :Unexpected end of file"

Someone please help!

One World To Another [DEMO] coming soon.
02-23-2011 12:22 PM
Find all posts by this user Quote this message in a reply
Vradcly Offline
Member

Posts: 100
Joined: Jan 2011
Reputation: 0
Post: #2
RE: Error when testing my map

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
you need a } here

02-23-2011 12:32 PM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #3
RE: Error when testing my map

(02-23-2011 12:32 PM)Vradcly Wrote:  void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("servant_grunt_1" , true);
you need a } here

It's fixed, thanks! Smile

One World To Another [DEMO] coming soon.
02-23-2011 12:39 PM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #4
RE: Error when testing my map

<LANGUAGE>
<RESOURCES>
</RESOURCES
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_PrisonKey">Prison Key</Entry>
<Entry Name="ItemDesc_PrisonKey">Key to unlock the door to prison.
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_hotel_1_Name">Hotel Room</Entry>
<Entry Name="Note_hotel_1_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

I got another problem, my note still don't have words, i try and try still don't have words, the description doesn't have words either, please help!

One World To Another [DEMO] coming soon.
(This post was last modified: 02-24-2011 10:21 AM by Raymond.)
02-24-2011 10:06 AM
Find all posts by this user Quote this message in a reply
Selyp Offline
Member

Posts: 210
Joined: Feb 2011
Reputation: 7
Post: #5
RE: Error when testing my map

(02-24-2011 10:06 AM)Raymond Wrote:  <LANGUAGE>
<RESOURCES>
</RESOURCES
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_PrisonKey">Prison Key</Entry>
<Entry Name="ItemDesc_PrisonKey">Key to unlock the door to prison. </Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_hotel_1_Name">Hotel Room</Entry>
<Entry Name="Note_hotel_1_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

I got another problem, my note still don't have words, i try and try still don't have words, the description doesn't have words either, please help!

you forgot the /entry after the prison key desc.

Atlantia - An Amnesia: The Dark Descent Full Conversion Mod
02-24-2011 10:29 AM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #6
RE: Error when testing my map

(02-24-2011 10:29 AM)Selyp Wrote:  
(02-24-2011 10:06 AM)Raymond Wrote:  <LANGUAGE>
<RESOURCES>
</RESOURCES
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Escape the castle!.</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_PrisonKey">Prison Key</Entry>
<Entry Name="ItemDesc_PrisonKey">Key to unlock the door to prison. </Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_hotel_1_Name">Hotel Room</Entry>
<Entry Name="Note_hotel_1_Text">Test</Entry>
</CATEGORY>
</LANGUAGE>

I got another problem, my note still don't have words, i try and try still don't have words, the description doesn't have words either, please help!

you forgot the /entry after the prison key desc.

Still didt'n work Sad

One World To Another [DEMO] coming soon.
02-24-2011 10:56 AM
Find all posts by this user Quote this message in a reply
Vradcly Offline
Member

Posts: 100
Joined: Jan 2011
Reputation: 0
Post: #7
RE: Error when testing my map

what did you write on in the properties of the note?

I know some ppl write the entire Note_hotel_1_Name so if you did, notice that it should be just hotel_1

(This post was last modified: 02-24-2011 11:05 AM by Vradcly.)
02-24-2011 11:04 AM
Find all posts by this user Quote this message in a reply
Nye Offline
Senior Member

Posts: 250
Joined: Jan 2011
Reputation: 2
Post: #8
RE: Error when testing my map

You need to change the sound name "unlock_door" to "unlock_door.snt".

Like this:

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_3", 0, false);
RemoveItem("prisonkey_1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}

void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1);
}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{

I mean, I imagine that there is no sound when you unlock the door without that Tongue

Also, for adding journal entries and notes, follow this tutorial: http://wiki.frictionalgames.com/hpl2/tut...omakenotes

(This post was last modified: 02-24-2011 12:03 PM by Nye.)
02-24-2011 12:00 PM
Find all posts by this user Quote this message in a reply
Raymond Offline
Member

Posts: 126
Joined: Feb 2011
Reputation: 0
Post: #9
RE: Error when testing my map

(02-24-2011 11:04 AM)Vradcly Wrote:  what did you write on in the properties of the note?

I know some ppl write the entire Note_hotel_1_Name so if you did, notice that it should be just hotel_1

My note's name is "hotel_1" and i write CH01L01 in the NoteText from the Entity Tab, and my .lang file is like this: <Entry Name="hotel_1_Name">Hotel Room"</Entry>
<Entry Name="hotel_1_Text">Test</Entry>

One World To Another [DEMO] coming soon.
(This post was last modified: 02-24-2011 12:02 PM by Raymond.)
02-24-2011 12:01 PM
Find all posts by this user Quote this message in a reply
Vradcly Offline
Member

Posts: 100
Joined: Jan 2011
Reputation: 0
Post: #10
RE: Error when testing my map

its supposed to be hotel_1 in Notetext field in entity tab Smile.

02-24-2011 12:16 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)