Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script ERROR need help N00B
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#11
RE: Script ERROR need help N00B

(05-01-2011, 01:03 AM)Karai16 Wrote:
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".

05-01-2011, 01:10 AM
Find
Karai16 Offline
Member

Posts: 164
Threads: 24
Joined: Apr 2011
Reputation: 0
#12
RE: Script ERROR need help N00B

(05-01-2011, 01:10 AM)Kyle Wrote:
(05-01-2011, 01:03 AM)Karai16 Wrote:
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...

Custom stories:
Her Games (100% Complete)
Her Games, All Bugs Fixed (100% Complete)
05-01-2011, 01:16 AM
Find
NylePudding Offline
Member

Posts: 77
Threads: 23
Joined: Apr 2011
Reputation: 0
#13
RE: Script ERROR need help N00B

Sorry about failing to capitalise. >_<

Hope it didn't mess things up too much.
05-01-2011, 08:03 AM
Find




Users browsing this thread: 1 Guest(s)