Frictional Games Forum (read-only)

Full Version: Onleave()?... Fatal error..
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I can't go through my second door. Then I get this error.

FATAL ERROR: could not load script file
'custom_stories/DanielsServants/Custom_stories/DanielsServants/Maps
/C:/Program Files/Amnesia - The Dark Descent/redist/custom-stories/DanielsServants/Maps/Hall.hps'!
ExecuteString (1,1):ERR : No matching signatures to 'OnLeace()' main (12,2):ERR: Unexpected end of file

anyone know how to fix this? Tongue

And this is my hps file.

void OnStart()
{
AddUseItemCallback("", "Key_1", "Storagedoor", "UsedKeyOnDoor, true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Storagedoor", false, true);
PlaySoundAtEntity("", "Unlock_door", "Storagedoor", 0, false);
RemoveItem(Key_1);
}

Void Onleave()
{

}
OnLeave, not Onleave.
(07-03-2011, 10:31 PM)Roenlond Wrote: [ -> ]OnLeave, not Onleave.
I changed it and it's not working.
capitalization also matter for void

void OnLeave()
{

}
(07-03-2011, 10:42 PM)Russ Money Wrote: [ -> ]capitalization also matter for void

void OnLeave()
{

}
It's not working :/
-----
(07-03-2011, 11:00 PM)Swistrobl Wrote: [ -> ]
Code:
RemoveItem(Key_1);
}

I suppose you should put quotation marks around Key_1.

EDIT: Also another quotation mark after UsedKeyOnDoor.
"UsedKeyOnDoor", true);
Thanks! Now I came through the second door Big Grin but I got a new problem. after I unlock the third door with the key, I can't enter it.. I don't get any errors but I simply just can't go through the door..
(07-03-2011, 11:12 PM)Tirilno Wrote: [ -> ]
(07-03-2011, 11:00 PM)Swistrobl Wrote: [ -> ]
Code:
RemoveItem(Key_1);
}

I suppose you should put quotation marks around Key_1.

EDIT: Also another quotation mark after UsedKeyOnDoor.
"UsedKeyOnDoor", true);
Thanks! Now I came through the second door Big Grin but I got a new problem. after I unlock the third door with the key, I can't enter it.. I don't get any errors but I simply just can't go through the door..

As in it's still locked or what? Make sure the names are spelled exactly the same.
Also, your door could be improperly planted. If its stuck in the ground even by a single pixel, it won't move. Try setting it to half its size just to see if this is the problem.
ERR: Unexpected end of file

so you dont have little characters

Code:
RemoveItem(Key_1)
change to
RemoveItem("Key_1");
Pages: 1 2