Wrong script!Why!? - 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: Wrong script!Why!? (/thread-6059.html) |
RE: Wrong script!Why!? - DIGI Byte - 01-07-2011 whats the problem officer? RE: Wrong script!Why!? - Akumasama - 01-07-2011 AddEntityCollideCallback("Player", "LostArea", "LostArea", true, 1); Same function- and objectname. RE: Wrong script!Why!? - toni1998 - 01-08-2011 Please help me FATAL ERROR could not load script file /......./...hps main(13, 11) :err :expected( My Script void OnStart() { //Collide Areas AddEntityCollideCallback("Player", "GruntArea", "CollideGrunt", true, 1); AddEntityCollideCallback("Player", "BruteArea", "CollideBrute", true, 1); AddEntityCollideCallback("Player", "DeadArea", "CollideDead", true, 1); AddEntityCollideCallback("Player", "LostArea", "CollideLost", true, 1); //Usable Items AddUseItemCallback("", "LivingKey", "LivingDoor", "UseKey1", true); AddUseItemCallback("", "CristalKey", "CristalDoor", "UseKey2", true); AddUseItemCallback("", "EscapeKey", "EscapeDoor", "UseKey3", true); } End Grunt Close mansion_4 End Brute Close CristalDoor //////////////////////////// //Run when entering map void OnEnter() { } //////////////////////////// //Run when leaving map void OnLeave() { } RE: Wrong script!Why!? - Tottel - 01-08-2011 End Grunt Close mansion_4 End Brute Close CristalDoor What are those doing there? Remove them and try again. RE: Wrong script!Why!? - toni1998 - 01-08-2011 now I do not go all the scripts and keys What to do to go Please someone tell me what to do If I say something wrong with me Please RE: Wrong script!Why!? - toni1998 - 02-10-2011 help fatal error .../....hps error 7.1 my script void OnStart() { AddUseCallBack("", "DulapKey_1", "Cabinet1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity); { SetSwingCabinetLocked("Cabinet1", false, true); PlaySoundAtEntity("", "unlocked_cabinet", "Cabinet1", 0, false) RemoveItem("DulapKey_1" } help my please RE: Wrong script!Why!? - Tanshaydar - 02-10-2011 If you can give us the exact row of the error, we'd gladly help. But I think the function you used is not AddUseCallBack, it should be AddUseItemCallback http://wiki.frictionalgames.com/hpl2/amnesia/script_functions RE: Wrong script!Why!? - Oscar House - 02-10-2011 Code: void OnStart() Fixed: 1. AddUseItemCallBack 2. Functions don't have a ; at the end 3. No such function as SetSwingCabinetLocked 4. Forgot the semicolon after PlaySoundAtEntity 5. Forgot ); after RemoveItem RE: Wrong script!Why!? - Janni1234 - 02-10-2011 You forgot "Item" AddUseItemCallback RE: Wrong script!Why!? - toni1998 - 02-10-2011 fatal error 9.1 unexpeted '{' void OnStart() { AddUseItemCallBack("", "DulapKey_1", "Cabinet1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Cabinet1", false, true); PlaySoundAtEntity("", "unlocked_cabinet", "Cabinet1", 0, false); RemoveItem("DulapKey_1"); } |