[SCRIPT] Error at unlocking door with an item - 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] Error at unlocking door with an item (/thread-16817.html) |
Error at unlocking door with an item - KingCrimson - 07-07-2012 It says: "FATAL ERROR: main (21,23) : ERR : Expected identifier" This is a copy of the .hps file: Quote:////////////////////////////secret1 = Key name lckd = Locked door name PS: I don't know if it might have something to do with the error. But the key you must use, you get it on the level before this one. RE: Error at unlocking door with an item - Cruzore - 07-07-2012 AddUseItemCallback("", "secret1", "lckd", "unlock", true); It's in no function. It will never be called(that's why that error is there). RE: Error at unlocking door with an item - KingCrimson - 07-07-2012 (07-07-2012, 10:40 PM)FastHunteR Wrote: AddUseItemCallback("", "secret1", "lckd", "unlock", true);I don't understand. I've already been nearly thirty minutes trying to fix this script and i think i'll get mad. Would you please correct my script and paste it in a reply? Thanks in advance RE: Error at unlocking door with an item - Cruzore - 07-07-2012 I have no idea when you plan to add that callback, since I can't read your mind. Cut that line of it out and paste it, I assume under OnStart(). RE: Error at unlocking door with an item - KingCrimson - 07-07-2012 I finally could make it work. Thanks, what you said was right, but i didn't understand it well. So the problem's solved. Thanks again for the help RE: Error at unlocking door with an item - FlawlessHappiness - 07-08-2012 also RemoveItem(secret1); should be RemoveItem("secret1"); shouldn't it? RE: Error at unlocking door with an item - KingCrimson - 07-08-2012 (07-08-2012, 12:11 AM)beecake Wrote: alsoI've actually left it as Quote: RemoveItem(asItem);and it's working perfectly |