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
sigh... a fatal error.. again!
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#1
sigh... a fatal error.. again!

I need help on this fatal error please!

This is what my maps .hps file says:

void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "level_dungeon_2", "unlock_level_dungeon_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_10", "unlock_cabinet_metal_10", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_9", "unlock_cabinet_metal_9", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_8", "unlock_cabinet_metal_8", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_7", "unlock_cabinet_metal_7", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_6", "unlock_cabinet_metal_6", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_5", "unlock_cabinet_metal_5", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_4", "unlock_cabinet_metal_4", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_3", "unlock_cabinet_metal_3", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_2", "unlock_cabinet_metal_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_1", "unlock_cabinet_metal_1", true);
}

void unlock_level_dungeon_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("level_dungeon_2", false);
    PlaySoundAtEntity("", "unlock_door", "level_dungeon_2", 0, false);
    RemoveItem("key_laboratory_1");
}

void unlock_cabinet_metal_10(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_10", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_10", 0, false);
}

void unlock_cabinet_metal_9(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_9", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_9", 0, false);
}

void unlock_cabinet_metal_8(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_8", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);

void unlock_cabinet_metal_7(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_7", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);
}

void unlock_cabinet_metal_6(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_6", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_6", 0, false);
}

void unlock_cabinet_metal_5(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_5", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_5", 0, false);
}

void unlock_cabinet_metal_4(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_4", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_4", 0, false);
}

void unlock_cabinet_metal_3(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_3", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_3", 0, false);
}

void unlock_cabinet_metal_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_2", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_2", 0, false);
}

void unlock_cabinet_metal_1(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_1", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_1", 0, false);
}

And this is what the error says:

FATAL ERROR: Could not load script file
'custom_stories/(secret)/maps/c:/Program Files (x86)/Steam/SteamApps/common/amnesia the dark descent/custom_stories/(secret)/maps/dungeon.hps'!
ExecuteString (1, 1) : ERR : No matching signatures to 'OnEnter()'
ExecuteString (1, 1) : ERR : No matching signatures to 'OnLeave()'
main (80, 2) : ERR : Unexpected end of file

Please help!
Thanks,
TheDavenia

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011, 02:07 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: sigh... a fatal error.. again!

Try this:

void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "level_dungeon_2", "unlock_level_dungeon_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_10", "unlock_cabinet_metal_10", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_9", "unlock_cabinet_metal_9", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_8", "unlock_cabinet_metal_8", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_7", "unlock_cabinet_metal_7", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_6", "unlock_cabinet_metal_6", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_5", "unlock_cabinet_metal_5", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_4", "unlock_cabinet_metal_4", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_3", "unlock_cabinet_metal_3", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_2", "unlock_cabinet_metal_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_1", "unlock_cabinet_metal_1", true);
}

void unlock_level_dungeon_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("level_dungeon_2", false);
    PlaySoundAtEntity("", "unlock_door", "level_dungeon_2", 0, false);
    RemoveItem("key_laboratory_1");
}

void unlock_cabinet_metal_10(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_10", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_10", 0, false);
}

void unlock_cabinet_metal_9(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_9", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_9", 0, false);
}

void unlock_cabinet_metal_8(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_8", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);
}
void unlock_cabinet_metal_7(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_7", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);
}

void unlock_cabinet_metal_6(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_6", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_6", 0, false);
}

void unlock_cabinet_metal_5(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_5", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_5", 0, false);
}

void unlock_cabinet_metal_4(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_4", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_4", 0, false);
}

void unlock_cabinet_metal_3(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_3", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_3", 0, false);
}

void unlock_cabinet_metal_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_2", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_2", 0, false);
}

void unlock_cabinet_metal_1(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_1", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_1", 0, false);
}

You forgot to end a function ( } ).

07-18-2011, 02:12 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#3
RE: sigh... a fatal error.. again!

(07-18-2011, 02:12 PM)Kyle Wrote: Try this:

void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "level_dungeon_2", "unlock_level_dungeon_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_10", "unlock_cabinet_metal_10", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_9", "unlock_cabinet_metal_9", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_8", "unlock_cabinet_metal_8", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_7", "unlock_cabinet_metal_7", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_6", "unlock_cabinet_metal_6", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_5", "unlock_cabinet_metal_5", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_4", "unlock_cabinet_metal_4", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_3", "unlock_cabinet_metal_3", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_2", "unlock_cabinet_metal_2", true);
AddUseItemCallback("", "hollow_needle_1", "cabinet_metal_1", "unlock_cabinet_metal_1", true);
}

void unlock_level_dungeon_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("level_dungeon_2", false);
    PlaySoundAtEntity("", "unlock_door", "level_dungeon_2", 0, false);
    RemoveItem("key_laboratory_1");
}

void unlock_cabinet_metal_10(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_10", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_10", 0, false);
}

void unlock_cabinet_metal_9(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_9", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_9", 0, false);
}

void unlock_cabinet_metal_8(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_8", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);
}
void unlock_cabinet_metal_7(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_7", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_7", 0, false);
}

void unlock_cabinet_metal_6(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_6", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_6", 0, false);
}

void unlock_cabinet_metal_5(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_5", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_5", 0, false);
}

void unlock_cabinet_metal_4(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_4", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_4", 0, false);
}

void unlock_cabinet_metal_3(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_3", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_3", 0, false);
}

void unlock_cabinet_metal_2(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_2", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_2", 0, false);
}

void unlock_cabinet_metal_1(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("cabinet_metal_1", false);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_1", 0, false);
}

You forgot to end a function ( } ).

Fatal error is gone but the closets don't unlock?
I can use the needle on them but they wont unlock?

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011, 02:20 PM
Find
Ouroboros Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jul 2011
Reputation: 0
#4
RE: sigh... a fatal error.. again!

Change SetLevelDoorLocked to SetSwingDoorLocked if you're trying to unlock cabinets.
Edit: only for the cabinets of course, level doors still need it.
(This post was last modified: 07-18-2011, 02:28 PM by Ouroboros.)
07-18-2011, 02:23 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#5
RE: sigh... a fatal error.. again!

(07-18-2011, 02:23 PM)Ouroboros Wrote: Change SetLevelDoorLocked to SetSwingDoorLocked if you're trying to unlock cabinets.
Edit: only for the cabinets of course, level doors still need it.

now i get this:

[Image: ferror.png]

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011, 02:31 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#6
RE: sigh... a fatal error.. again!

You need three columns for setswingdoorlocked, not just two. Add a true/false to each of them if you wish to use effects when it happens.
07-18-2011, 02:40 PM
Find
Ouroboros Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jul 2011
Reputation: 0
#7
RE: sigh... a fatal error.. again!

Do you have anything in OnEnter() and/or OnLeave()? If you do, something might be missing and causing errors all the way down.

Edit: Roenlond is right, I completely missed that.
(This post was last modified: 07-18-2011, 02:43 PM by Ouroboros.)
07-18-2011, 02:41 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#8
RE: sigh... a fatal error.. again!

Thanks guys
(07-18-2011, 02:40 PM)Roenlond Wrote: You need three columns for setswingdoorlocked, not just two. Add a true/false to each of them if you wish to use effects when it happens.

I got one more question what do i got to add as a function that if i unlock the closet the doors fly open and a scream sound or something plays?

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
(This post was last modified: 07-18-2011, 03:05 PM by TheDavenia.)
07-18-2011, 03:04 PM
Find
Ouroboros Offline
Junior Member

Posts: 20
Threads: 0
Joined: Jul 2011
Reputation: 0
#9
RE: sigh... a fatal error.. again!

(07-18-2011, 03:04 PM)TheDavenia Wrote: Thanks guys
(07-18-2011, 02:40 PM)Roenlond Wrote: You need three columns for setswingdoorlocked, not just two. Add a true/false to each of them if you wish to use effects when it happens.

I got one more question what do i got to add as a function that if i unlock the closet the doors fly open and a scream sound or something plays?

You have to do something like
SetSwingDoorAutoCloseDisable(closet name, true);
SetSwingDoorClosed(closet name, false, true);
And then you have to find out the body name of the closet type you're using and use
//for metal closets/cabinets
AddBodyForce("metal_cabinet_1_rightDoor", 0, 0, 0, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 0, 0, 0, "world");

This link will take you to a wiki page I made actually just a little bit ago about it. The three 0s are the directions to add the force, so if it opened toward -Z, it would be 0, 0, -900.
First zero is X, second is Y, and the third is Z.
07-18-2011, 03:35 PM
Find
TheDavenia Offline
Member

Posts: 223
Threads: 38
Joined: Jun 2011
Reputation: 0
#10
RE: sigh... a fatal error.. again!

(07-18-2011, 03:35 PM)Ouroboros Wrote:
(07-18-2011, 03:04 PM)TheDavenia Wrote: Thanks guys
(07-18-2011, 02:40 PM)Roenlond Wrote: You need three columns for setswingdoorlocked, not just two. Add a true/false to each of them if you wish to use effects when it happens.

I got one more question what do i got to add as a function that if i unlock the closet the doors fly open and a scream sound or something plays?

You have to do something like
SetSwingDoorAutoCloseDisable(closet name, true);
SetSwingDoorClosed(closet name, false, true);
And then you have to find out the body name of the closet type you're using and use
//for metal closets/cabinets
AddBodyForce("metal_cabinet_1_rightDoor", 0, 0, 0, "world");
AddBodyForce("metal_cabinet_1_leftDoor", 0, 0, 0, "world");

This link will take you to a wiki page I made actually just a little bit ago about it. The three 0s are the directions to add the force, so if it opened toward -Z, it would be 0, 0, -900.
First zero is X, second is Y, and the third is Z.

A little bit to complicated for me i'm just a starter could you add it for me please?
Here's the code or the cabinet:
void unlock_cabinet_metal_9(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("cabinet_metal_9", false, true);
    PlaySoundAtEntity("", "unlock_door", "cabinet_metal_9", 0, false);
}

Current Project: Nightmare's End(Project Director, Scripter, boss >:D)
07-18-2011, 03:42 PM
Find




Users browsing this thread: 1 Guest(s)