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
Help me! Help me now! :(
Tenishan Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2012
Reputation: 0
#1
Help me! Help me now! :(

Hey guys, this is my first post!

I've been trying to learn the basics of scripting, and I find it rather difficult! Blush Anyhow; I tried to make a key work to a door, but I just can't seem to get it right... Here's the script I've written:


void Onstart()
{
AddUseItemCallback("", "awesomekey_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("awesomekey_1");
}

Where did I get it wrong?
04-05-2012, 07:16 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Help me! Help me now! :(

Onstart is not OnStart.

Tutorials: From Noob to Pro
04-05-2012, 07:26 PM
Website Find
Tenishan Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2012
Reputation: 0
#3
RE: Help me! Help me now! :(

Thanks man! Works like a charm. It's interesting that one letter can make everything fall apart! xD
04-05-2012, 07:33 PM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#4
RE: Help me! Help me now! :(

Oh, wow. I had no idea scripts were cAsE SeNsItIvE! Thanks YC, AGAIN!

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-05-2012, 07:58 PM
Website Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#5
RE: Help me! Help me now! :(

(04-05-2012, 07:58 PM)JetlinerX Wrote: Oh, wow. I had no idea scripts were cAsE SeNsItIvE! Thanks YC, AGAIN!
But you've released mods and made over 400 posts here! Now I'm all kinds of confused. That's one of the first things you learn. Huh


Noob scripting tutorial: From Noob to Pro

04-05-2012, 11:08 PM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#6
RE: Help me! Help me now! :(

I've always just used the correct capital letters! XD

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

04-06-2012, 04:24 AM
Website Find




Users browsing this thread: 1 Guest(s)