Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
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.
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 |
|
Karai16
Member
Posts: 164
Threads: 24
Joined: Apr 2011
Reputation:
0
|
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.
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 |
|
NylePudding
Member
Posts: 77
Threads: 23
Joined: Apr 2011
Reputation:
0
|
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 |
|
|