![]() |
MY CAPS LOCK BUTTON BROKE - 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: MY CAPS LOCK BUTTON BROKE (/thread-24187.html) |
RE: CUSTOM STORY ERROR MESSAGES! - PutraenusAlivius - 12-23-2013 (12-23-2013, 01:11 AM)Romulator Wrote: I went through the OP code and corrected most of your errors. Some of them you will have to fix on your own because I do not know exactly where they have to go, or why they are there. I commented any changes and notes you need to take care of. I also did some aligning so I could understand your coding a little better. Modified Rom's script here. You forgot to put in some f's to some of the numbers BECAUSE they're floats, not integers. RE: CUSTOM STORY ERROR MESSAGES! - DnALANGE - 12-23-2013 Muperdebump.. Looks like the REAL prof's taking over.. Sorry i haven't got a LOT of time here.. ![]() Didn't want to add a WRONG script offc. Next time ill try to take a little more time or wait for other people here. Thanks ROm and JAP RE: MY CAPS LOCK BUTTON BROKE - Romulator - 12-23-2013 Whether they are floats or integers, they would still pass correctly in most cases, unless it is a decimal value. And in response, yes. There are one or two things you need to check: 1. Your AddTimer in the middle of the code. Place it somewhere in the code within a void. I don't know what is supposed to happen, so if you need to, make the player collide with a ScriptArea and make some appropriate code for that: PHP Code: OnStart() ![]() And the second thing is right down the bottom, you have two touchdoor voids, which you cannot ![]() Dont worry DNaLANGE. It's all about assistance. You managed to get him from 4 errors to 1, so it's all about progress ![]() RE: MY CAPS LOCK BUTTON BROKE - Radical Batz - 12-23-2013 (12-23-2013, 01:41 AM)Romulator Wrote: Whether they are floats or integers, they would still pass correctly in most cases, unless it is a decimal value.OK, it's still getting me the same 1 error now! that is this "main (63,2):ERR: A Function with the same name and parameters already exist" I don't understand exactly of what i'm supposed to do, and I haven't seen a repeated code! here is the updated code, do you see a repeated one, cause I don't! void PickupKey(string &in asEntity, string &in asItem) { AddQuest("quest1", "TestQuest"); AddUseItemCallback("", "MasterBedroomKey", "bedroomdoor","UseMasterBedroomKey", true); AddEntityCollideCallback("Player", "AreaMemento", "EventQuest", true, 1); } void UseMasterBedroomKey(string &in asItem, string &in asEntity) { SetMessage("message", "message1", 3); } void NAMETHISYOURTIMER(string &in asTimer) { AddTimer("", 1.1, "TimerDoorCanClose"); } void TimerDoorCanClose(string &in asTimer) { SetSwingDoorDisableAutoClose("Door", false); } void WHATYOUWANTTOHAPPNHERE(string &in asTimer) { AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true); AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1); } void UseCrowbarOnDoor(string &in asItem, string &in asEntity) { RemoveItem(asItem); PlaySoundAtEntity("", "player_crouch.snt", "Player", 0.05, false); AddTimer(asEntity, 0.2, "TimerPlaceCrowbar"); } void TimerPlaceCrowbar(string &in asTimer) { SetEntityActive("Joint", true); PlaySoundAtEntity("", "puzzle_place_jar.snt", asTimer, 0, false); } void BreakDoor(string &in asParent, string &in asChild, int alState) { SetEntityActive("Joint", false); SetEntityActive("Broken", true); SetSwingDoorLocked("Door", false, false); SetSwingDoorClosed("Door", false, false); SetSwingDoorDisableAutoClose("Door", true); AddPropImpulse("Door", 0, 0,3, "world"); CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "Areaeffect", false); PlaySoundAtEntity("", "break_wood_metal", "Areaeffect", 0, false); GiveSanityBoostSmall(); PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false); AddTimer("", 0.1, "TimerPushDoor"); } void TimerPushDoor(string &in asTimer) { AddPropImpulse("Door", -4, 2, 1, "world"); AddTimer("", 1.1, "TimerDoorCanClose"); } void TimerDoorCanClose(string &in asTimer) { SetSwingDoorDisableAutoClose("Door", false); } void touchdoor(string &in asEntity, string &in type) { AddQuest("door", "touchdoor"); } void EventQuest(string &in asParent, string &in asChild, int alState) { AddQuest("area", "enterarea"); } void touchdoor(string &in asEntity) { AddQuest("door", "touchdoor"); } RE: MY CAPS LOCK BUTTON BROKE - DnALANGE - 12-23-2013 Meaning you have a COPY of the same name somewhere in YOUR case it´s THIS : touchdoor - You can NOT use the same name twice in a script. Just make it toutchdoor1 or whatever will work. - USE Notepad++, THEN you cans ee what is good and NOT good, It's free o use. Try google it up. RE: MY CAPS LOCK BUTTON BROKE - Romulator - 12-23-2013 (12-23-2013, 01:56 AM)DnALANGE Wrote: Meaning you have a COPY of the same name somewhere I pointed this out a few times ![]() PHP Code: void touchdoor(string &in asEntity, string &in type) Last few lines of your code. You have two touchdoor voids. RE: MY CAPS LOCK BUTTON BROKE - Radical Batz - 12-23-2013 (12-23-2013, 01:56 AM)DnALANGE Wrote: Meaning you have a COPY of the same name somewhereactally that touchdoor is supposed to be there twice! RE: MY CAPS LOCK BUTTON BROKE - Romulator - 12-23-2013 Could you perhaps explain why it needs to be there twice? I don't see anything to assume it must... RE: MY CAPS LOCK BUTTON BROKE - Radical Batz - 12-23-2013 (12-23-2013, 02:04 AM)Romulator Wrote: Could you perhaps explain why it needs to be there twice? I don't see anything to assume it must...my mistake, there isn't supposed to be touch door twice, well now I deleted that but it still gets me the same error message! ![]() (12-23-2013, 01:56 AM)DnALANGE Wrote: Meaning you have a COPY of the same name somewhereI did touchdoor1 but it still gets me the same error message! I'm literally confused RE: MY CAPS LOCK BUTTON BROKE - Romulator - 12-23-2013 TimerDoorCanClose() also appears twice, both seemingly do the same thing. |