Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected end of file [PROBLEM]
GillFrog Offline
Junior Member

Posts: 26
Threads: 7
Joined: Mar 2011
Reputation: 1
#1
Sad  Unexpected end of file [PROBLEM]

Okay. So i made a test map with the level editor.
And when i try to load it, an error pop up and says:
FATAL ERROR: Could not load script file 'custom_stories/test/maps/testmap01.hps'!
Main (12,1) :ERR :Unexpected end of file

I don't know what to do.
Heres my .hps file:


Quote:void OnEnter()
{
AddUseItemCallback("", "keytodesk", "desk", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity}
{
SetSwingDoorLocked("desk", false, true);
PlaySoundAtEntity("", "unlock_door", "desk", 0, false);
RemoveItem("keytodesk");
}
(This post was last modified: 12-02-2011, 06:35 PM by GillFrog.)
12-01-2011, 11:09 PM
Website Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Unexpected end of file [PROBLEM]

void OnEnter()
{
AddUseItemCallback("", "keytodesk", "desk", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("desk", false, true);
PlaySoundAtEntity("", "unlock_door", "desk", 0, false);
RemoveItem("keytodesk");
}
The above code should be fixed now Smile.
You had placed a closing brace "}" on the end of "UsedKeyOnDoor(string &in asItem, string &in asEntity}" instead of a closing bracket ")" which was causing your error.
(This post was last modified: 12-01-2011, 11:51 PM by Apjjm.)
12-01-2011, 11:49 PM
Find
GillFrog Offline
Junior Member

Posts: 26
Threads: 7
Joined: Mar 2011
Reputation: 1
#3
RE: Unexpected end of file [PROBLEM]

Oh my god Big Grin
I'm an idiot. Thank you!!!

12-02-2011, 12:12 AM
Website Find




Users browsing this thread: 1 Guest(s)