Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expected Identifier Error
Author Message
Cranky Old Man Offline
Posting Freak

Posts: 922
Joined: Apr 2012
Reputation: 37
Post: #4
RE: Expected Identifier Error

(05-02-2012 03:03 AM)bkrstirregular Wrote:  .. I'm still confused ;_; Can I just copy the entire code that I have onto here?
Are you just confused about how it should look, or is the code still not working after you corrected it?
The corrected code should look like this:
OnStart()
{
  //AddUseItemCallback
  AddUseItemCallback("", "Key_1", "firstdoor1", "UsedKeyOnDoor", true);
}

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

Noob scripting tutorial: From Noob to Pro

(This post was last modified: 05-02-2012 03:09 AM by Cranky Old Man.)
05-02-2012 03:08 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Expected Identifier Error - bkrstirregular - 05-02-2012, 02:18 AM
RE: Expected Identifier Error - Cranky Old Man - 05-02-2012 03:08 AM



User(s) browsing this thread: 1 Guest(s)