Frictional Games Forum (read-only)
[SCRIPT] Unexpected end of file 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: [SCRIPT] Unexpected end of file Error :( (/thread-12851.html)



Unexpected end of file Error :( - samixxa - 01-25-2012

Im getting the "Unexpected end of file" Error, and i really cant spot the mistake? Please help Smile

Code:
void OnStart ()
{
    AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
    AddUseItemCallback("", "monsterkey", "monsterdoor", "UsedKeyOnDoor__2", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("door_1", false, true);
    PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
    RemoveItem("key_1");
}

void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("monsterdoor, false, true);
    PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
    RemoveItem("monsterkey");
}



RE: Unexpected end of file Error :( - Tripication - 01-25-2012

remove the space after void OnStart


RE: Unexpected end of file Error :( - samixxa - 01-25-2012

Didn't work :S



RE: Unexpected end of file Error :( - Tripication - 01-25-2012

change
SetSwingDoorLocked("monsterdoor, false, true);
to
SetSwingDoorLocked("monsterdoor", false, true);



missed the "


RE: Unexpected end of file Error :( - samixxa - 01-25-2012

totally missed that! Thanks for the help! Smile



RE: Unexpected end of file Error :( - Tripication - 01-25-2012

no probs