10-16-2016, 09:47 PM
So I just finished scripting my first map. Here's the .hps file:
After that, I made the .hps file for my second map. Here it is:
The issue here is that the second map does not load. Since I'm pretty new to the editor and scripting it could be a little bit silly. Anyways, the error that shows up is:
I did try some things, but I'm kinda lost here so any help is appreciated!
p.s: looks like I posted in the wrong section. my bad.
Spoiler below!
void OnStart()
{
AddUseItemCallback("", "lockpick", "introcelldoor", "UseKeyOnDoor", true);
AddUseItemCallback("", "BlockBKey", "BlockB", "UseKeyOnLevelDoor", true);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void UseKeyOnLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "door_sewer_unlock.snt", asEntity, 0, false);
RemoveItem(asItem);
CompleteQuest("touchblockdoor", "BlockBLocked");
GiveSanityBoost();
}
void touchblockdoor(string &in asEntity)
{
AddQuest("touchblockdoor", "BlockBLocked");
}
{
AddUseItemCallback("", "lockpick", "introcelldoor", "UseKeyOnDoor", true);
AddUseItemCallback("", "BlockBKey", "BlockB", "UseKeyOnLevelDoor", true);
}
void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}
void UseKeyOnLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "door_sewer_unlock.snt", asEntity, 0, false);
RemoveItem(asItem);
CompleteQuest("touchblockdoor", "BlockBLocked");
GiveSanityBoost();
}
void touchblockdoor(string &in asEntity)
{
AddQuest("touchblockdoor", "BlockBLocked");
}
After that, I made the .hps file for my second map. Here it is:
Spoiler below!
void OnStart()
{
SetEntityPlayerLookAtCallback("", "lookatcorpse", true);
}
void lookatcorpse(string &in asEntity, 1)
{
GiveSanityDamage(25.0f, true)
}
{
SetEntityPlayerLookAtCallback("", "lookatcorpse", true);
}
void lookatcorpse(string &in asEntity, 1)
{
GiveSanityDamage(25.0f, true)
}
The issue here is that the second map does not load. Since I'm pretty new to the editor and scripting it could be a little bit silly. Anyways, the error that shows up is:
Spoiler below!
FATAL ERROR
Couldn't load (map name and directory here)
ExecuteString (1,1): ERR : No matching signatures to 'OnLeave()'
main (6, 40) : ERR : Expected data type
Couldn't load (map name and directory here)
ExecuteString (1,1): ERR : No matching signatures to 'OnLeave()'
main (6, 40) : ERR : Expected data type
I did try some things, but I'm kinda lost here so any help is appreciated!

p.s: looks like I posted in the wrong section. my bad.
