![]() |
Unexpected End in my code :c - 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: Unexpected End in my code :c (/thread-29523.html) |
Unexpected End in my code :c - You So Russo - 01-20-2015 My code has got unexpected end but i dont know where or how since I can't see anything that doesn't not work. PHP Code: void OnStart() RE: Unexpected End in my code :c - Mudbill - 01-20-2015 PHP Code: AddEntityCollideCallback("Player", "ZoneCollide, "Dialogue", true, 1); There's a missing quote after ZoneCollide. You can easily tell because the color inverts for the whole script after that point. PHP Code: void UseKeyOnDoor("Key1", "Door1") Constructors also should not have parameters like that. These should be PHP Code: (string &in asItem, string &in asEntity) RE: Unexpected End in my code :c - You So Russo - 01-20-2015 I've changed it and found there also wasn't a ; after the removeitem but it still says unexpected error :c RE: Unexpected End in my code :c - Mudbill - 01-20-2015 What does the error say though? It will give you two numbers that tell you where in your file the issue starts. RE: Unexpected End in my code :c - You So Russo - 01-20-2015 FATAL ERROR: Could not load script file (43, 2): ERR : Unexpected end of file. RE: Unexpected End in my code :c - Mudbill - 01-20-2015 I don't see anything really wrong. The error mentions the very end of the file, but the third character (including 0) is non existant, is it? Perhaps an odd parsing symbol has snuck its way in there? RE: Unexpected End in my code :c - Daemian - 01-20-2015 Quote:Unexpected end of fileSounds like a missing brace } Post your script? edit: Oh it's up there. ok. I don't know. It seems correct for me too. Can you try this one below? PHP Code: void OnStart() RE: Unexpected End in my code :c - You So Russo - 01-21-2015 Oh wow, that worked haha but what did you change? Just found out my key didn't even work that whole time neither T_T. Anyhow thanks dude! EDIT: Fixed my key no worries c: |