[SOLVED] Script Problem - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: [SOLVED] Script Problem (/thread-7377.html) |
[SOLVED] Script Problem - laser50 - 04-14-2011 Hey guys, While scripting i ran into a error and i have NO idea what to do or how to fix it. So i decided to ask it here. ERROR: Code: main (62, 25) :ERR :Expected data Type My Code: Code: void UsedKeyOnDoor(string &in asItem, string &in asEntity) ((THis is one part of where the error is.)) RE: Script Problem - Pandemoneus - 04-14-2011 Post your whole code so we can see which line it is pointing at... RE: Script Problem - laser50 - 04-15-2011 Here is my FULL code: Code: void OnStart() RE: Script Problem - laser50 - 04-15-2011 Could someone please take a look and help me here?? Thanks. RE: Script Problem - Dalroc - 04-15-2011 void OnLeverStateChange Where did you find this function? Never seen it and it's not on the script functions page on the wiki so I guess this is the problem RE: Script Problem - laser50 - 04-15-2011 I found it here: http://www.frictionalgames.com/forum/thread-5117.html I think it should work. (I think it worked on a level before I reinstalled my PC...) RE: Script Problem - MrBigzy - 04-15-2011 That's a user defined function, like MonsterFunc1 for example. It's not a "script function". Use this: GetLeverState(string& asName); RE: Script Problem - laser50 - 04-15-2011 Then how should i use it if i use GetLeverState? SOme help would be great. (I'm much of a newb when it comes to scripting.) RE: Script Problem - MrBigzy - 04-15-2011 If you just want to open a door with a lever, this is the best way I think: SetEntityConnectionStateChangeCallback(string& asName, string& asCallback); So if you had SetEntityConnectionStateChangeCallback("LeverOpensDoor", "LeverDoor"); Code: void LeverDoor(string &in EntityName, int alState) Something like that. RE: Script Problem - laser50 - 04-16-2011 I fixed it. Thanks for the help everyone! |