Nemesis751
Junior Member
Posts: 7
Threads: 1
Joined: Sep 2010
Reputation:
0
|
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 |
|
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
|
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 |
|
Nemesis751
Junior Member
Posts: 7
Threads: 1
Joined: Sep 2010
Reputation:
0
|
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 |
|
Equil
Member
Posts: 94
Threads: 8
Joined: Sep 2010
Reputation:
0
|
RE: Unexpected end of file?
No problem.
|
|
09-30-2010, 04:00 PM |
|
|