Frictional Games Forum (read-only)
Onleave()?... Fatal 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: Onleave()?... Fatal error.. (/thread-8940.html)

Pages: 1 2


Onleave()?... Fatal error.. - Tirilno - 07-03-2011

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

}


RE: Onleave()?... Fatal error.. - Roenlond - 07-03-2011

OnLeave, not Onleave.


RE: Onleave()?... Fatal error.. - Tirilno - 07-03-2011

(07-03-2011, 10:31 PM)Roenlond Wrote: OnLeave, not Onleave.
I changed it and it's not working.



RE: Onleave()?... Fatal error.. - Russ Money - 07-03-2011

capitalization also matter for void

void OnLeave()
{

}


RE: Onleave()?... Fatal error.. - Tirilno - 07-03-2011

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

void OnLeave()
{

}
It's not working :/



RE: Onleave()?... Fatal error.. - Poppuhik42 - 07-03-2011

-----


RE: Onleave()?... Fatal error.. - Tirilno - 07-03-2011

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



RE: Onleave()?... Fatal error.. - Russ Money - 07-04-2011

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


RE: Onleave()?... Fatal error.. - DamnNoHtml - 07-04-2011

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.


RE: Onleave()?... Fatal error.. - Paulpolska - 07-04-2011

ERR: Unexpected end of file

so you dont have little characters

Code:
RemoveItem(Key_1)
change to
RemoveItem("Key_1");