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
Locked Door and Key Issue
Nitrowing Offline
Junior Member

Posts: 16
Threads: 4
Joined: Dec 2010
Reputation: 0
#3
RE: Locked Door and Key Issue

Fatal Error: Could not load script.
Main (1, 13) : ERR: Expected Data Type
Main (40, 1) : ERR: Unexpected token '}'

OK so I fixed the second error by removing the } at the last line. The (1, 13) one I'm not so sure about.
I'd assume it wants something added/changed to this line:
void UseKey("Hotel Room Key", "Hotel Room Door"){

Resolved the issue by browsing some more. Scrapped the old stuff and threw this at the end of the basic one.
////////////////////////////
// Actual functions

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Hotel Room Door", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Hotel Room Door", 0.0f, false);
RemoveItem("Hotel Room Key");
AddDebugMessage("The Door has successfully opened. Congratulations!", false);
}
And this at the onEnter part:
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Hotel Room Key", "Hotel Room Door", "KeyOnDoor", true);
}
(This post was last modified: 12-22-2010, 07:22 AM by Nitrowing.)
12-22-2010, 05:51 AM
Find


Messages In This Thread
Locked Door and Key Issue - by Nitrowing - 12-22-2010, 12:55 AM
RE: Locked Door and Key Issue - by ThePaSch - 12-22-2010, 04:00 AM
RE: Locked Door and Key Issue - by Nitrowing - 12-22-2010, 05:51 AM



Users browsing this thread: 1 Guest(s)