Unexpected end of file problem, Need help NOW! - 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 of file problem, Need help NOW! (/thread-30601.html) |
Unexpected end of file problem, Need help NOW! - JohnS0N - 09-18-2015 Without further ado, Here's the .hps file: void OnStart() { AddUseItemCallback("", "Doorkey1", "Roomdoor1", "UsedKeyOnDoor" true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Roomdoor1", false, true); PlaySoundAtEntity("", ""unlock_door", "Roomdoor1", 0, false); RemoveItem("Doorkey1"); } void OnEnter() { PlayMusic("Level1Theme.ogg", true, 0.8, 2, 1, true); } void OnExit() { } RE: Unexpected end of file problem, Need help NOW! - FlawlessHappiness - 09-18-2015 (09-18-2015, 12:08 PM)JohnS0N Wrote: AddUseItemCallback("", "Doorkey1", "Roomdoor1", "UsedKeyOnDoor" true);You forgot a comma between "UsedKeyOnDoor" and true (09-18-2015, 12:08 PM)JohnS0N Wrote: PlaySoundAtEntity("", ""unlock_door", "Roomdoor1", 0, false);You have too many quotation signs. Remember that the number of quotation signs should always be even. In this line you have 7. (09-18-2015, 12:08 PM)JohnS0N Wrote: PlayMusic("Level1Theme.ogg", true, 0.8, 2, 1, true);Remember to put an f after decimals. You have to, because Amnesia uses floats. Unexpected end of file usually means you have an uneven number of "quotation marks", (parenthesizes) or {brackets}. RE: Unexpected end of file problem, Need help NOW! - Mudbill - 09-18-2015 You don't actually have to put 'f' after a float (decimal) value. The only thing that happens is that Amnesia does an unnecessary conversion, as it assumes the value to be a double instead of a float. The conversion doesn't really affect anything, but if you want a clean log, you might wanna use the 'f' as it triggers a warning without. RE: Unexpected end of file problem, Need help NOW! - FlawlessHappiness - 09-18-2015 (09-18-2015, 08:09 PM)Mugbill Wrote: You don't actually have to put 'f' after a float (decimal) value. The only thing that happens is that Amnesia does an unnecessary conversion, as it assumes the value to be a double instead of a float. The conversion doesn't really affect anything, but if you want a clean log, you might wanna use the 'f' as it triggers a warning without. It's good practice RE: Unexpected end of file problem, Need help NOW! - Mudbill - 09-18-2015 True that. RE: Unexpected end of file problem, Need help NOW! - PutraenusAlivius - 09-19-2015 Quote:AddUseItemCallback("", "Doorkey1", "Roomdoor1", "UsedKeyOnDoor", true); You missed a comma after the function UsedKeyOnDoor. Quote:PlaySoundAtEntity("", ""unlock_door", "Roomdoor1", 0, false); You have an extra quotation mark. RE: Unexpected end of file problem, Need help NOW! - Mudbill - 09-19-2015 Both of those were already pointed out, ya know. No need to bloat the thread. RE: Unexpected end of file problem, Need help NOW! - JohnS0N - 04-17-2016 Hey guys, I got this fixed now. Thanks! but I need your help once more! https://www.frictionalgames.com/forum/thread-44418.html RE: Unexpected end of file problem, Need help NOW! - Romulator - 04-17-2016 (04-17-2016, 06:17 PM)JohnS0N Wrote: Hey guys, I got this fixed now. Thanks! but I need your help once more! Hello - you don't need to bump an old thread to inform others about your issue. Your other post is at the top of the subforum, and will be noticed by other users. Locking~ |