![]() |
Again an Error Message -.- - 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: Again an Error Message -.- (/thread-15673.html) |
Again an Error Message -.- - P44RTHURN4X - 05-28-2012 Hey all, I'm... Ah don't worry. Ehm, there is an errmessage: FATAL ERROR: blablabla... main (134,11) : ERR : Expected data type Yes, I know my mistake but I want to know, what the right syntax type for this is: [line 32] SetLanternLitCallback("l04"); [line 134 - 143] void l04(true) { SetEnemyDisableTrigger("serv", true); AddEnemyPatrolNode("serv", "PathNodeArea_1", 0, ""); AddEnemyPatrolNode("serv", "PathNodeArea_2", 0, ""); AddEnemyPatrolNode("serv", "PathNodeArea_3", 0, ""); AddEnemyPatrolNode("serv", "PathNodeArea_4", 0, ""); AddEnemyPatrolNode("serv", "PathNodeArea_5", 0, ""); AddEntityCollideCallback("serv", "show_1", "lo010"); } in the frictional games wiki is this: void SetLanternLitCallback(string& asCallback); Sets the function to call when the player uses his lantern. Callback syntax: MyFunc(bool abLit) What is bool abLit? true or false? Please tell me! GReeZe' P44 RE: Again an Error Message -.- - Your Computer - 05-28-2012 You need to do research on the difference between parameters and arguments. RE: Again an Error Message -.- - FlawlessHappiness - 05-28-2012 What is it exactly you want to do? If you want the monster to spawn IF the lantern is lit i would use a "get" script. And yes bool is usually true and false Quote:main (134,11) : ERR : Expected data type RE: Again an Error Message -.- - jens - 05-28-2012 Make Code: void l04(true) into Code: void l04(bool abLit) abLit is a parameter, meaning it is a bool with the value of either true or false. When you turn the lantern on it will be true and when you turn it off it will be false. So you can then use this parameter to do different things, as you know if the lantern is on or off from it. So if you want to trigger the enemy patrol only when turning the lantern on you would do something like: Code: void l04(true) RE: Again an Error Message -.- - Your Computer - 05-28-2012 His next errors will (should) be no matching signatures to SetEnemyDisableTrigger(string, bool) and AddEntityCollideCallback(string, string, string). |