+- 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)
Edit ; Haven't got time now to really test, Finished my FC mod..
If there are any errors let me\us know here.
I'll check some often here.
Good luck!
RE: CUSTOM STORY ERROR MESSAGES! - Romulator - 12-23-2013
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.
I also noticed DnALANGE beat me to it Though either of ours should suffice, unspoiler mine if you need to
Spoiler below!
PHP Code:
void OnStart() //The AddCallbacks were not within a void. Placed within OnStart(). { AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true); AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1); }
void UseMasterBedroomKey(string &in asItem, string &in asEntity) { SetMessage("message", "message1", 3.0f); //Changed from integer to float. Does not affect the way it is run however. }
AddTimer("", 1.1, "TimerDoorCanClose"); //AddTimer() can only be used within a routine (void). Collide with a scriptarea if necessary. Move it or give it a void as necessary. //Moved brace to under the below void.
//void TimerDoorCanClose(string &in asTimer) //This code has been used before. May cause errors when called again in code. //{ //It is easier to call a new timer and use that instead. //SetSwingDoorDisableAutoClose("Door", false); //And it is missing a closing brace :P //}
void touchdoor(string &in asEntity) //You cannot name two routines after the same void. Change this to touchdoor_2 or something. { //You will need to change any codes/messages as well which point to here. AddQuest("door", "touchdoor"); }
If you find you cannot read it well because of browser limitations, download it from here
RE: CUSTOM STORY ERROR MESSAGES! - Radical Batz - 12-23-2013
Edit ; Haven't got time now to really test, Finished my FC mod..
If there are any errors let me\us know here.
I'll check some often here.
Good luck!
Thanks but now it's getting me only one error and it's saying
"A Function with the same name and parameters already exist"
does that mean I have a code that is repeated twice?, cause I don't see a code that has been written twice, do you?
RE: CUSTOM STORY ERROR MESSAGES! - PutraenusAlivius - 12-23-2013
Use Romulator's script.
RE: CUSTOM STORY ERROR MESSAGES! - Radical Batz - 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.
I also noticed DnALANGE beat me to it Though either of ours should suffice, unspoiler mine if you need to
Spoiler below!
PHP Code:
void OnStart() //The AddCallbacks were not within a void. Placed within OnStart(). { AddUseItemCallback("", "Crowbar", "Door", "UseCrowbarOnDoor", true); AddEntityCollideCallback("Joint", "AreaBreak", "BreakDoor", true, 1); }
void UseMasterBedroomKey(string &in asItem, string &in asEntity) { SetMessage("message", "message1", 3.0f); //Changed from integer to float. Does not affect the way it is run however. }
AddTimer("", 1.1, "TimerDoorCanClose"); //AddTimer() can only be used within a routine (void). Collide with a scriptarea if necessary. Move it or give it a void as necessary. //Moved brace to under the below void.
//void TimerDoorCanClose(string &in asTimer) //This code has been used before. May cause errors when called again in code. //{ //It is easier to call a new timer and use that instead. //SetSwingDoorDisableAutoClose("Door", false); //And it is missing a closing brace :P //}
void touchdoor(string &in asEntity) //You cannot name two routines after the same void. Change this to touchdoor_2 or something. { //You will need to change any codes/messages as well which point to here. AddQuest("door", "touchdoor"); }
If you find you cannot read it well because of browser limitations, download it from here
thanks but is the code that you put fixed? like ready? or I have to read the script and fix it myself?