Frictional Games Forum (read-only)
Level Door error! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Level Door error! (/thread-24288.html)



Level Door error! - Radical Batz - 01-04-2014

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()
{

}


RE: HPS file won't work after using the lang file!? need help!!! QUICK! - Daemian - 01-04-2014

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?


RE: HPS file won't work after using the lang file!? need help!!! QUICK! - Radical Batz - 01-04-2014

(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"


RE: HPS file won't work after using the lang file!? need help!!! QUICK! - daortir - 01-04-2014

Well looks like you did something wrong with your onLeave function ^^. Could you give us the code lines around onLeave ?


RE: Level Door error! - Radical Batz - 01-04-2014

(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!


RE: Level Door error! - RaideX - 01-05-2014

not sure if that is correct but in the first line it should be

PHP Code:
void OnStart () {

//code 



you forgot a 'space' Wink


RE: Level Door error! - Romulator - 01-05-2014

^ 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


RE: Level Door error! - daortir - 01-05-2014

No space between "OnStart" and "()" is needed though : ).


RE: Level Door error! - Romulator - 01-05-2014

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()
{





RE: Level Door error! - Radical Batz - 01-05-2014

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