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
Error when testing my map
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#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
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#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
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#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
Selyp Offline
Member

Posts: 210
Threads: 19
Joined: Feb 2011
Reputation: 7
#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
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#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
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#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
Raymond Offline
Member

Posts: 126
Threads: 24
Joined: Feb 2011
Reputation: 0
#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
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#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




Users browsing this thread: 2 Guest(s)