[SCRIPT] Help... - 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] Help... (/thread-21042.html) |
Help... - Darkboot - 04-04-2013 Error: FATAL ERROR: Could not load script file 'custom_stories/Me/maps/Me.hps'! main (5, 7) : ERR : Data type can't be 'void' main 2, 25) : ERR : Only objects hace constructors main (11, 1) : ERR : No matching signatures to 'PlaySoundEntity(string@&, string@&, string@&, const uinst, const boll)' hps file: //////////////////////////// // Run first time starting map void OnStart() { void AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_1", false, true); PlaySoundEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("awesomekey_1"); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } i have followed the instructions both in video and the frictionalgames wiki and i doubled check if i missed something and i cant really see that i missed something, help? RE: Help... - OriginalUsername - 04-04-2013 It's PlaySoundAtEntity RE: Help... - Darkboot - 04-04-2013 Thanks hehe im a noob so excuse me but that didnt solve this main (5, 7) : ERR : Data type can't be 'void' main 2, 25) : ERR : Only objects hace constructors Edit: i solved them but i need help with this one, i had it Before and couldnt figure it out main (9, 1) : ERR : Expected '(' you see my hps file above RE: Help... - OriginalUsername - 04-04-2013 You don't have to use an void in the OnStart() Remove that and you're done... I hope RE: Help... - Darkboot - 04-04-2013 Thats just caused Another error so im keeping the " void " :/ other ideas? RE: Help... - OriginalUsername - 04-04-2013 (04-04-2013, 06:57 PM)Darkboot Wrote: Thats just caused Another error so im keeping the " void " :/ Don't keep the void... That won't work. Trust me. Are you sure you have the same the right names and if there's a cache, delete it. Code: void OnStart() RE: Help... - NaxEla - 04-04-2013 You need to post your newest script because we don't know what errors you've fixed and what you've changed. RE: Help... - Darkboot - 04-04-2013 //////////////////////////// // Run first time starting map void OnStart() { void AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true); } void UsedKeyOnDoor { SetSwingDoorLocked("mansion_1", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false); RemoveItem("awesomekey_1"); } //////////////////////////// // Run when entering map void OnEnter() { } //////////////////////////// // Run when leaving map void OnLeave() { } Thats how it looks now and i only get this error: main (9, 1) : ERR : Expected '(' RE: Help... - NaxEla - 04-04-2013 You need to take out the void before AddUseItemCallback. Edit: you also need to write Code: (string &in asItem, string &in asEntity) RE: Help... - Darkboot - 04-04-2013 (04-04-2013, 07:22 PM)NaxEla Wrote: You need to take out the void before AddUseItemCallback. How do you mean with " take out the void"? |