Frictional Games Forum (read-only)

Full Version: Level Door error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I made the level door teleport me to another map, but whenever I click on the level door and loads the map it just gets me this error
and it's not the level door that does this error, even when i spawn in the map that the level door takes me too

"FATAL ERROR: Could not load script file 'custom stories/Lifeless_The Abandon/maps/C:/Program Files/Amnesia - Thew Dark Descent/ redist/ custom stories/Lifeless_ The Abandon/maps/ Lieless_The Abandon3.hps'! ExecuteString (1, 1):ERR :No matching signatures to 'onLeave()' main (1,2) :ERR :Expected identifier"

and here is the hps of the level door is supposed to teleport me to

voidOnStart()

{AddUseItemCallback("OpenDoor", "key_tomb_1", "level_celler_1", "UnlockLevelDoor",true);

}

voidOnEnter()
{

}


void UnlockLevelDoor(string &in item, &in entity)
{
SetLevelDoorLocked(Entity, false);
//RemoveItem(item);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
Maybe the sanity boost is not doing anything because your sanity is full ?
I don't see any problem, try without your "check" variable.

And the level door may be locked?
(01-04-2014, 05:04 PM)Amn Wrote: [ -> ]Maybe the sanity boost is not doing anything because your sanity is full ?
I don't see any problem, try without your "check" variable.

And the level door may be locked?

ok the sanity i got it working, but the level door is not locked, I made it to teleport to another map, but it gets me this message when ever it loads the other map! "FATAL ERROR: Could not load script file 'custom stories/Lifeless_The Abandon/maps/C:/Program Files/Amnesia - Thew Dark Descent/ redist/ custom stories/Lifeless_ The Abandon/maps/ Lifeless_The Abandon3.hps'! ExecuteString (1, 1):ERR :No matching signatures to 'onLeave()' main (1,2) :ERR :Expected identifier"
Well looks like you did something wrong with your onLeave function ^^. Could you give us the code lines around onLeave ?
(01-04-2014, 05:35 PM)daortir Wrote: [ -> ]Well looks like you did something wrong with your onLeave function ^^. Could you give us the code lines around onLeave ?

I updated the post!
not sure if that is correct but in the first line it should be

PHP Code:
void OnStart () {

//code 



you forgot a 'space' Wink
^ And In the OnEnter, you have voidOnEnter. Forgot a space there too Smile Refer to that same code above to fix that :3

Edit: Put all the stuff you'll need in a post below Tongue
No space between "OnStart" and "()" is needed though : ).
Try this. Should fix everything Smile
PHP Code:
void OnStart()  //As pointed out by RaideX and daortir
{
AddUseItemCallback("OpenDoor""key_tomb_1""level_celler_1""UnlockLevelDoor"true);
}

//Removed the OnEnter() here, because there is one below :P

void UnlockLevelDoor(string &in asItemstring &in asEntity)  //Fixed referenced items
{
SetLevelDoorLocked(asEntityfalse);  //Changed Entity to asEntity
//RemoveItem(asitem);          //Changed to asItem. If you want it removed, remove the //.
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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


I already fixed it before these comments, but your answers are still correct to make it get fixed! thanks anyway guys Smile