Frictional Games Forum (read-only)
Fatal Error Script - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Fatal Error Script (/thread-5073.html)



Fatal Error Script - Mateh - 10-16-2010

Small problem witch script Code text of error {main (6,1):ERR : expected ';' }
:
script:

Quote:////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key_tower_1", "prison_section_1", "UsedKeyOnDoor", true)
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("prison_section_1", false, true);
PlaySoundAtEntity("", "unlockdoor", "prison_section_1", 0, false);
RemoveItem("key_tower_1");
}


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

}

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

}


What is wrong in the names are well written.
Sorry for may Englisch.


RE: Fatal Error Script - Entih - 10-16-2010

The error says there is an issue on line six. Now observe the error it tells you.

You must learn to read the error and find whats wrong by what it says.

Spoiler below!
Semicolon after that line in the OnStart function.



RE: Fatal Error Script - Mateh - 10-16-2010

Thanks Entih for help.It's working.