Frictional Games Forum (read-only)
Script ERROR need help N00B - 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: Script ERROR need help N00B (/thread-7714.html)

Pages: 1 2


RE: Script ERROR need help N00B - Kyle - 05-01-2011

(05-01-2011, 01:03 AM)Karai16 Wrote:
Code:
void OnStart()
{
    AddUseItemCallback("", "RoomKey", "RoomDoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string&in asEntity)
{
    SetSwingDoorLocked("RoomDoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "RoomDoor", 0, false);
    RemoveItem("RoomKey");
}
This is my code of my test map. It has a UsedKeyOnDoor code. My code is working, so you can compare and see if there are any mistakes.

Smile

I notice that there is no space in "string&in asEntity", which is supposed to be "string &in asEntity".


RE: Script ERROR need help N00B - Karai16 - 05-01-2011

(05-01-2011, 01:10 AM)Kyle Wrote:
(05-01-2011, 01:03 AM)Karai16 Wrote:
Code:
void OnStart()
{
    AddUseItemCallback("", "RoomKey", "RoomDoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string&in asEntity)
{
    SetSwingDoorLocked("RoomDoor", false, true);
    PlaySoundAtEntity("", "unlock_door", "RoomDoor", 0, false);
    RemoveItem("RoomKey");
}
This is my code of my test map. It has a UsedKeyOnDoor code. My code is working, so you can compare and see if there are any mistakes.

Smile

I notice that there is no space in "string&in asEntity", which is supposed to be "string &in asEntity".

Don't look at me, my code works fine, I'm just giving it to him to compare to his own. o.o If it's a mistake, it is appearantly neglectable, or Amnesia is able to repair the code to read it somehow...


RE: Script ERROR need help N00B - NylePudding - 05-01-2011

Sorry about failing to capitalise. >_<

Hope it didn't mess things up too much.