![]() |
ERR : Expected ";" - 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: ERR : Expected ";" (/thread-25400.html) |
ERR : Expected ";" - Zizilon - 06-01-2014 So currently i'm making a Amnesia CS. I wanted to put a jumpscare and something is wrong with my script and i've been trying to find the problem and I couldn't find it, can you please tell me the problem in my script? And when I load the map it says: ERR : Expected ";" Here is my script: //////////////////////////// // Run when entering map void OnStart() { PlayMusic("introtheme.ogg", true, 0.9, 1.0, 1, true) AddUseItemCallback("", "Key", "Door_2", "UseKeyOnDoor", true); AddEntityCollideCallback("Player", "Walk_Quest_Area", "GetWalkQuest", true, 1); AddEntityCollideCallback("Player", "Walk_Quest_Area2", "GetWalkQuest2", true, 1); AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1); } void NailThatSucker(string &in asParent, string &in asChild, int alState) { SetEntityActive("Jesus", true); AddPropForce("Jesus", -10000, 0, 0, "world"); PlaySoundAtEntity("", "24_iron_maiden.snt", "Jesus", 0, false); } void GetWalkQuest2(string &in asParent, string &in asChild, int alState) { AddQuest("walkquest2", "WalkQuest2"); } void GetWalkQuest(string &in asParent, string &in asChild, int alState) { AddQuest("walkquest", "WalkQuest"); } void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door", asEntity, 0, false); RemoveItem(asItem); } void Message1(string &in asChild, string &in asParent, int alState) { SetMessage("Messages", "Popup1", 5); //This stands for ("Name of category", "Name of entry", time to be displayed on the screen);. } void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { StopMusic(1 , 1); } RE: ERR : Expected ";" - Neelke - 06-01-2014 PlayMusic is missing a ; PlayMusic("introtheme.ogg", true, 0.9, 1.0, 1, true); Replace it with this above. And I can see on this script that this is a teleporting naked guy (or a Jesus as you prefere it). I wouldn't recommend using it. RE: ERR : Expected ";" - The chaser - 06-02-2014 I'm posting this with my mobile and I cant copy paste, but the commentary at the end has a ; that shouldnt be. (I think) RE: ERR : Expected ";" - WALP - 06-03-2014 (06-01-2014, 02:42 PM)Zizilon Wrote: void OnStart() As informed in the headline a ";" is expected, but at the end of PlayMusic you forgot to add one. so: (06-01-2014, 02:42 PM)Zizilon/TheMug Wrote: PlayMusic("introtheme.ogg", true, 0.9, 1.0, 1, true); RE: ERR : Expected ";" - eliasfrost - 06-03-2014 programming 101: Always end a statement with a semi-colon. Depends on the language though. RE: ERR : Expected ";" - Romulator - 06-03-2014 (06-03-2014, 02:58 PM)eliasfrost Wrote: programming 101: Always end a statement with a semi-colon. Depends on the language though. Not vb.net ![]() RE: ERR : Expected ";" - eliasfrost - 06-03-2014 "depends on language" ![]() |