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
Script Help Unexpected end of file Error :(
samixxa Offline
Junior Member

Posts: 12
Threads: 3
Joined: Nov 2011
Reputation: 0
#1
Unexpected end of file Error :(

Im getting the "Unexpected end of file" Error, and i really cant spot the mistake? Please help Smile

void OnStart ()
{
    AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
    AddUseItemCallback("", "monsterkey", "monsterdoor", "UsedKeyOnDoor__2", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("door_1", false, true);
    PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
    RemoveItem("key_1");
}

void UsedKeyOnDoor_2(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("monsterdoor, false, true);
    PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
    RemoveItem("monsterkey");
}
01-25-2012, 12:31 PM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#2
RE: Unexpected end of file Error :(

remove the space after void OnStart

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-25-2012, 12:34 PM
Find
samixxa Offline
Junior Member

Posts: 12
Threads: 3
Joined: Nov 2011
Reputation: 0
#3
RE: Unexpected end of file Error :(

Didn't work :S
01-25-2012, 12:38 PM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#4
RE: Unexpected end of file Error :(

change
SetSwingDoorLocked("monsterdoor, false, true);
to
SetSwingDoorLocked("monsterdoor", false, true);



missed the "

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-25-2012, 12:39 PM
Find
samixxa Offline
Junior Member

Posts: 12
Threads: 3
Joined: Nov 2011
Reputation: 0
#5
RE: Unexpected end of file Error :(

totally missed that! Thanks for the help! Smile
01-25-2012, 12:42 PM
Find
Tripication Offline
Member

Posts: 172
Threads: 19
Joined: Dec 2011
Reputation: 6
#6
RE: Unexpected end of file Error :(

no probs

[Image: speedart__2___yoshimitsu_by_kamofudge-d4yo6kk.png]
01-25-2012, 12:43 PM
Find




Users browsing this thread: 3 Guest(s)