ok so its been about 5 hours now and i still cant get this to work im making a custom story and i followed all the instructions to make a key open a door script and then everytime i try to run the map in game it says unable to load script unexpected end of file. here is my .HPS also i dont have much in the map either just two rooms basically its like a test. please respond asap!
void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);
for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
AddUseItemCallback("", "Newdoorkey_1", "Newdoor", "UsedKeyOnDoor", "true");
{
void UsedDoorKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Newdoor", false, true);
PlaySoundAtEntity("", "","Newdoor", 0, false);
RemoveItem(Newdoorkey_1);
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}