The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script fatal error?
Rapsis Offline
Member

Posts: 69
Threads: 6
Joined: Oct 2012
Reputation: 0
#1
Script fatal error?

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!
10-13-2012, 06:12 PM
Find


Messages In This Thread
Script fatal error? - by Rapsis - 10-13-2012, 06:12 PM
RE: Script fatal error? - by Adny - 10-13-2012, 06:22 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:31 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 06:48 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:52 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 06:57 PM
RE: Script fatal error? - by Adny - 10-13-2012, 06:47 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 06:56 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 08:47 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 08:58 PM
RE: Script fatal error? - by Rapsis - 10-13-2012, 09:02 PM
RE: Script fatal error? - by The chaser - 10-13-2012, 09:54 PM



Users browsing this thread: 1 Guest(s)