Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected end of file?
Author Message
Nemesis751 Offline
Junior Member

Posts: 7
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Equil Offline
Member

Posts: 94
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Nemesis751 Offline
Junior Member

Posts: 7
Joined: Sep 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Equil Offline
Member

Posts: 94
Joined: Sep 2010
Reputation: 0
Post: #4
RE: Unexpected end of file?
No problem. Smile
09-30-2010 04:00 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)