Frictional Games Forum (read-only)

Full Version: Need help on my custom story!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Yeah as the topic says, I need help on my own custom story.
I get this error when I try to load it:
FATAL ERROR: Could not load script file 'custom_stories'/TerrorsEnd Map/maps/Terrorsend.hps'!
main (37,1) : ERR : Unexpected end of file.

EDIT: Fixed the Unexpected end of file, thanks to Damascus. But here's a new error!

main (18,51) : ERR : Expected ')' or ','
main (19,52) : ERR : Expected ')' or ','
main (20,51) : ERR : Expected ')' or ','
main (21,52) : ERR : Expected ')' or ','

Here's my HPS:


////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest(namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true)
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
(06-26-2012, 01:34 AM)TerrorsEnd Wrote: [ -> ]Yeah as the topic says, I need help on my own custom story.
I get this error when I try to load it:
FATAL ERROR: Could not load script file 'custom_stories'/TerrorsEnd Map/maps/Terrorsend.hps'!
main (37,1) : ERR : Unexpected end of file.

Here's my HPS:


////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest(namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Copy how it is now. You forgot to close one of the functions. You also forgot a semicolon.
(06-26-2012, 01:46 AM)bored2tears Wrote: [ -> ]
(06-26-2012, 01:34 AM)TerrorsEnd Wrote: [ -> ]Yeah as the topic says, I need help on my own custom story.
I get this error when I try to load it:
FATAL ERROR: Could not load script file 'custom_stories'/TerrorsEnd Map/maps/Terrorsend.hps'!
main (37,1) : ERR : Unexpected end of file.

Here's my HPS:


////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest(namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Copy how it is now. You forgot to close one of the functions. You also forgot a semicolon.
Still the same errorSad
(06-26-2012, 01:48 AM)TerrorsEnd Wrote: [ -> ]
(06-26-2012, 01:46 AM)bored2tears Wrote: [ -> ]
(06-26-2012, 01:34 AM)TerrorsEnd Wrote: [ -> ]Yeah as the topic says, I need help on my own custom story.
I get this error when I try to load it:
FATAL ERROR: Could not load script file 'custom_stories'/TerrorsEnd Map/maps/Terrorsend.hps'!
main (37,1) : ERR : Unexpected end of file.

Here's my HPS:


////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest(namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Copy how it is now. You forgot to close one of the functions. You also forgot a semicolon.
Still the same errorSad
Hmm, from the line it says, the problem is somewhere in the voidOnLeave function. Try taking that out for now, unless you actually are going to be using it.
(06-26-2012, 02:21 AM)bored2tears Wrote: [ -> ]
(06-26-2012, 01:48 AM)TerrorsEnd Wrote: [ -> ]
(06-26-2012, 01:46 AM)bored2tears Wrote: [ -> ]
(06-26-2012, 01:34 AM)TerrorsEnd Wrote: [ -> ]Yeah as the topic says, I need help on my own custom story.
I get this error when I try to load it:
FATAL ERROR: Could not load script file 'custom_stories'/TerrorsEnd Map/maps/Terrorsend.hps'!
main (37,1) : ERR : Unexpected end of file.

Here's my HPS:


////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest(namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
Copy how it is now. You forgot to close one of the functions. You also forgot a semicolon.
Still the same errorSad
Hmm, from the line it says, the problem is somewhere in the voidOnLeave function. Try taking that out for now, unless you actually are going to be using it.
I took it off, same error but its now on the line where end is now which is after RemoveItem("Monsterdoor_key1");
}
Well, you can keep it back to the original. I am sure someone will come along and help, since I cannot seem to find the error.
(06-26-2012, 02:30 AM)bored2tears Wrote: [ -> ]Well, you can keep it back to the original. I am sure someone will come along and help, since I cannot seem to find the error.
Okay, I will keep searching for the solution.
Missing a quotation mark in CompleteQuest. Also keep in mind that "Unexpected end of file" will always specify the last line in the script, so it's no help in finding where the actual error is.

////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest("namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
(06-26-2012, 04:49 AM)Damascus Wrote: [ -> ]Missing a quotation mark in CompleteQuest. Also keep in mind that "Unexpected end of file" will always specify the last line in the script, so it's no help in finding where the actual error is.

////////////////////////////
// Run when entering map
void OnEnter()
{
AddEntityCollideCallback("Player", "Breakout_Quest_Area", "GetBreakoutQuest", true, 1);
AddUseItemCallback("", "Monsterdoorkey_1", "Monsterdoor", "UsedKeyOnDoor", true);

AddQuest("namequest", "NameQuest");

CompleteQuest("namequest", "NameQuest");

AddEntityCollideCallback("Player", "scr_monster_spawn_1", "SpawnEnemy1", true, 1);

}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea 1", 0.9r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 30.0t,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0.0r,"");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 30.0t,"");
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Monsterdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "monsterdoor", 0, false);
RemoveItem("Monsterdoor_key1");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
This quotation mark helped but now I get this error: 17,1 : ERR : Unexpected token '{'

Which is this one:
void SpawnEnemy1(string &in asParent, string &in asChild, int alState);
{
Semi-colons aren't supposed to be found in function headers.
Pages: 1 2