![]() |
Script Issues - 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 Issues (/thread-22355.html) Pages:
1
2
|
Script Issues - Gilligan's Hell - 08-08-2013 I Don't understand, i keep getting that fucking Unexpected token error whenever i load my map. Script: void OnStart() { SetEntityPlayerLookAtCallback("", "memory", "looking", false); } void looking(string &in asEntity, int alState); { SetMessage("", "Messages", "Iremember", 10) } I'm only really good a mapping, i'm shit at scripting. void PhonographScare(string &in EntityName, int alState); { if(alState == 1) ///revised int alCount to int alState { PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false); SetPropStaticPhysics("Phonograph_1", true); } } void OnEnter() { } void OnLeave() { } I Really need help here. RE: Script Issues - Kreekakon - 08-08-2013 Code: SetMessage("", "Messages", "Iremember", 10) You're missing a semi colon here. It should be: Code: SetMessage("", "Messages", "Iremember", 10); Also is this the full script? If so, then I don't see anything calling the PhonographScare function RE: Script Issues - Gilligan's Hell - 08-08-2013 Tried it, Didn't work. Got the same error. (08-08-2013, 06:21 AM)Kreekakon Wrote: How could i have missed that. as i said, I Fucking suck at scripting, also i haven't slept for 32 hours. RE: Script Issues - Kreekakon - 08-08-2013 Haha get some sleep. It'll definitely benefit your work in the long run ![]() RE: Script Issues - Gilligan's Hell - 08-08-2013 Yeah. I'll try to fix the script after i get some sleep. Ok now its giving me a "No Matching signatures" error. RE: Script Issues - Your Computer - 08-08-2013 SetMessage only takes three parameters (string, string, float). RE: Script Issues - Gilligan's Hell - 08-08-2013 Ok now its a different issue, It gives me a Unexpected End of File error. Script: void OnStart() { SetEntityPlayerLookAtCallback("Paintingher", "looking", false); AddUseItemCallback("", "billard_key", "billarddoor", "UseKeyOnDoor", true); } void Lockedbillard(string &in entity) { if(GetSwingDoorLocked("billarddoor",) == true) { SetMessage("Messages", "Lockeddoor", 6); } } void looking(string &in asEntity, int alState){ SetMessage("Messages", "Memory", 9); } void OnEnter() { } void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("billarddoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); void PhonographScare(string &in EntityName, int alState) { if(alState == 1) ///revised int alCount to int alState { PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false); SetPropStaticPhysics("Phonograph_1", true); } } void OnLeave() { } RE: Script Issues - The chaser - 08-08-2013 (08-08-2013, 10:01 PM)Havervahn Wrote: Ok now its a different issue, It gives me a Unexpected End of File error. void OnStart() { SetEntityPlayerLookAtCallback("Paintingher", "looking", false); AddUseItemCallback("", "billard_key", "billarddoor", "UseKeyOnDoor", true); } void Lockedbillard(string &in entity) { if(GetSwingDoorLocked("billarddoor") == true) { SetMessage("Messages", "Lockeddoor", 6); } } void looking(string &in asEntity, int alState) { SetMessage("Messages", "Memory", 9); } void OnEnter() { } void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("billarddoor", false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); } void PhonographScare(string &in EntityName, int alState) { if(alState == 1) ///revised int alCount to int alState { PlaySoundAtEntity("", "broken_music_box.ogg", "Phonograph_1", 5.0f, false); SetPropStaticPhysics("Phonograph_1", true); } } void OnLeave() { } It should be fixed now, I removed an innecessary "," and added a missing {. RE: Script Issues - Gilligan's Hell - 08-08-2013 Thanks! That fixed the Script issue. Okay the only issue i'm having now is that the messages aren't showing. RE: Script Issues - The chaser - 08-08-2013 Ok then, post your .lang file. |