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 Help Key
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#1
Key

When I try to launch my story it says Masterbedroomkey was not declared... or something like that.... anything wrong here?
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Masterbedroomkey", "masterbedroomdoor", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("masterbedroomdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "masterbedroomdoor", 0, false);
RemoveItem(Masterbedroomkey);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
(This post was last modified: 02-01-2012, 04:29 PM by Saren.)
02-01-2012, 04:28 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: Key

Check if you have named your key Masterbedroomkey Smile

(This post was last modified: 02-01-2012, 04:33 PM by SilentStriker.)
02-01-2012, 04:32 PM
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#3
RE: Key

(02-01-2012, 04:32 PM)SilentStriker Wrote: Check if you have named your key Masterbedroomkey Smile
Indeed I have =)

02-01-2012, 04:38 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Key

I don't know if it's needed but have you made a entry for the key in the .lang file? Smile

Nvm I found the problem, You forgot "" on RemoveItem Wink

(This post was last modified: 02-01-2012, 04:41 PM by SilentStriker.)
02-01-2012, 04:40 PM
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#5
RE: Key

Hmm.... that might be the problem.. lol, I don't think it's NESSERCARY either but... let's give it a go xD
02-01-2012, 04:42 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: Key

(02-01-2012, 04:42 PM)Saren Wrote: Hmm.... that might be the problem.. lol, I don't think it's NESSERCARY either but... let's give it a go xD
it should look like this RemoveItem("Masterbedroomkey");


02-01-2012, 04:45 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#7
RE: Key

(02-01-2012, 04:42 PM)Saren Wrote: I don't think it's NESSERCARY
It is necessary.



02-01-2012, 04:53 PM
Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#8
RE: Key

Still nothing =(

(02-01-2012, 04:53 PM)flamez3 Wrote:
(02-01-2012, 04:42 PM)Saren Wrote: I don't think it's NESSERCARY
It is necessary.
Sooo, you got an idea what's wrong?


(This post was last modified: 02-01-2012, 05:10 PM by Saren.)
02-01-2012, 05:00 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Key

(02-01-2012, 05:00 PM)Saren Wrote: Sooo, you got an idea what's wrong?

Read post #6.

Tutorials: From Noob to Pro
02-01-2012, 07:32 PM
Website Find
Saren Offline
Member

Posts: 196
Threads: 20
Joined: Jan 2012
Reputation: 1
#10
RE: Key

(02-01-2012, 07:32 PM)Your Computer Wrote: Read post #6.
Right....
Great... now it said something about a ; .... Maybe missing, 1 too much.. I dunno...

(This post was last modified: 02-01-2012, 07:37 PM by Saren.)
02-01-2012, 07:36 PM
Find




Users browsing this thread: 1 Guest(s)