[SOLVED] 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: [SOLVED] Script Help. (/thread-11616.html) |
[SOLVED] Script Help. - A Tricky Carnie - 12-02-2011 Okay, so in my map, I have it so when the player enters an area a water monster will spawn, but I'm having an issue with the script. This is my script: Code: //////////////////////////// When I load the map I'm getting an error at 13,1 saying theres an unexpected token, so I'd like to know what I did wrong. Thanks for any help in advance. RE: Script Help. - Obliviator27 - 12-02-2011 (12-02-2011, 03:20 AM)A Tricky Carnie Wrote: Okay, so in my map, I have it so when the player enters an area a water monster will spawn, but I'm having an issue with the script. This is my script: Code: //////////////////////////// I found three errors. 1) Your syntax for the function is incorrect. You had string &in asName, bool abActive. Those are just parameters used for the specific functions. The callback syntax for AddEntityCollideCallback would be string &in asParent, string &in asChild, int alState. 2) int AlState at the ned of AddEntityCollideCallback needs to be a 1, 0, or -1, with 1 when the area is entered, -1 when the area is left, and 0 for both. 3) I assume you wanted the function only to be called once, so your false parameter within AddEntityCollideCallback needed to be true. RE: Script Help. - A Tricky Carnie - 12-02-2011 (12-02-2011, 03:58 AM)Obliviator27 Wrote:Even with the corrections, I'm still getting the unexpected token at 13,1 (the '{' after the 'Void SpawnWaterMonster)(12-02-2011, 03:20 AM)A Tricky Carnie Wrote: Okay, so in my map, I have it so when the player enters an area a water monster will spawn, but I'm having an issue with the script. This is my script: RE: Script Help. - Obliviator27 - 12-02-2011 Derp. Just caught on to what I missed. There's a semi-colon after void SpawnWaterMonster. Remove that. RE: Script Help. - A Tricky Carnie - 12-02-2011 (12-02-2011, 09:58 PM)Obliviator27 Wrote: Derp. Just caught on to what I missed. There's a semi-colon after void SpawnWaterMonster. Remove that.ah, thanks for the help. |