10-13-2012, 06:12 PM
Hey everyone,
I'm making a custom story, and I get this error:
FATAL ERROR:
Could not load script file 'custom_stories/*secret*/maps/map1.hps'!
main (10,11) : ERR : Expected identifier
main (11,1) : ERR : Unexpected token '{'
My map1.hps
void OnStart()
{
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, -1);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
}
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
{
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}
void OnLeave()
{
}
Could you explain what am I doing wrong? I'm just a beginner at both HTML and the level editor, so if anybody could fix the code and explain, it would mean a lot to me as I would learn.
P.S. Sorry for my terrible English!
I'm making a custom story, and I get this error:
FATAL ERROR:
Could not load script file 'custom_stories/*secret*/maps/map1.hps'!
main (10,11) : ERR : Expected identifier
main (11,1) : ERR : Unexpected token '{'
My map1.hps
void OnStart()
{
AddEntityCollideCallback("Player", "Studydooropen", "CollideRoomTwo", true, -1);
}
void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_2", true, true);
}
AddUseItemCallback("", "bedroomkey_1", "mansion_1", "UsedKeyOnDoor", true);
{
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("bedroomkey_1");
}
void OnLeave()
{
}
Could you explain what am I doing wrong? I'm just a beginner at both HTML and the level editor, so if anybody could fix the code and explain, it would mean a lot to me as I would learn.
P.S. Sorry for my terrible English!