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?
Nemesis751 Offline
Junior Member

Posts: 7
Threads: 1
Joined: Sep 2010
Reputation: 0
#1
Unexpected end of file?

Hello every one as the thread subject states whenever is try to load my custom story i get "Unexpected end of file" and i cant figure out for the life of me what to do??

This is my simple script

///////////////////////////
//Run first time starting map
void OnStart()
{
AddUseItemCallback("", "StorageKey_1", "keydoor_1", "UsedKeyonDoor", true);

void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(keydoor_1, false, true);
PlaySoundAtEntity("", "guardian_activated1", "Player", 0, false);
RemoveItem(StorageKey_1);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
09-30-2010, 10:35 AM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#2
RE: Unexpected end of file?

void OnStart()
{
AddUseItemCallback("", "StorageKey_1", "keydoor_1", "UsedKeyonDoor", true);

void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(keydoor_1, false, true);
PlaySoundAtEntity("", "guardian_activated1", "Player", 0, false);
RemoveItem(StorageKey_1);
}

You're missing a } I think in your OnStart. try:

void OnStart()
{
AddUseItemCallback("", "StorageKey_1", "keydoor_1", "UsedKeyonDoor", true);
}

void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(keydoor_1, false, true);
PlaySoundAtEntity("", "guardian_activated1", "Player", 0, false);
RemoveItem(StorageKey_1);
}
09-30-2010, 10:44 AM
Find
Nemesis751 Offline
Junior Member

Posts: 7
Threads: 1
Joined: Sep 2010
Reputation: 0
#3
RE: Unexpected end of file?

You're missing a } I think in your OnStart. try:

void OnStart()
{
AddUseItemCallback("", "StorageKey_1", "keydoor_1", "UsedKeyonDoor", true);
}

void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(keydoor_1, false, true);
PlaySoundAtEntity("", "guardian_activated1", "Player", 0, false);
RemoveItem(StorageKey_1);
}
[/quote]

Thank you every much my friend works fine now ^^
09-30-2010, 03:39 PM
Find
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#4
RE: Unexpected end of file?

No problem. Smile
09-30-2010, 04:00 PM
Find




Users browsing this thread: 2 Guest(s)