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 Help...
OriginalUsername Offline
Posting Freak

Posts: 896
Threads: 42
Joined: Feb 2013
Reputation: 34
#20
RE: Help...

(04-05-2013, 10:44 AM)Darkboot Wrote: ////////////////////////////
// Run first time starting map

void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string&in asItem, string &in as Entity);

{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
}


////////////////////////////
// Run when entering map
void OnEnter()
{

}


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

}
------------------------------------------------------------------------------------------------------------------------------------
My script right now.

If i deleted the " Void " of "adduseitemcallback" i got another error and the others 2 in the beginning of this page said that the " void " should fix the prolem when i had it.

ERROR:
unexpected token '{'

You don't need an ';' after UsedKeyOnDoor(string&in asItem, string &in as Entity). That's only for inside the functions
04-05-2013, 12:18 PM
Find


Messages In This Thread
Help... - by Darkboot - 04-04-2013, 05:38 PM
RE: Help... - by OriginalUsername - 04-04-2013, 06:07 PM
RE: Help... - by Darkboot - 04-04-2013, 06:20 PM
RE: Help... - by OriginalUsername - 04-04-2013, 06:38 PM
RE: Help... - by Darkboot - 04-04-2013, 06:57 PM
RE: Help... - by OriginalUsername - 04-04-2013, 07:08 PM
RE: Help... - by NaxEla - 04-04-2013, 07:16 PM
RE: Help... - by Darkboot - 04-04-2013, 07:18 PM
RE: Help... - by NaxEla - 04-04-2013, 07:22 PM
RE: Help... - by Darkboot - 04-04-2013, 07:37 PM
RE: Help... - by Slanderous - 04-04-2013, 09:30 PM
RE: Help... - by NaxEla - 04-04-2013, 07:43 PM
RE: Help... - by Yare - 04-04-2013, 07:44 PM
RE: Help... - by Darkboot - 04-04-2013, 07:59 PM
RE: Help... - by NaxEla - 04-04-2013, 08:47 PM
RE: Help... - by Yare - 04-04-2013, 08:48 PM
RE: Help... - by Darkboot - 04-04-2013, 09:06 PM
RE: Help... - by OriginalUsername - 04-04-2013, 09:30 PM
RE: Help... - by Darkboot - 04-05-2013, 10:44 AM
RE: Help... - by OriginalUsername - 04-05-2013, 12:18 PM
RE: Help... - by Tiger - 04-05-2013, 01:50 PM
RE: Help... - by Darkboot - 04-05-2013, 02:38 PM
RE: Help... - by Darkboot - 04-05-2013, 07:27 PM
RE: Help... - by OriginalUsername - 04-05-2013, 05:43 PM



Users browsing this thread: 9 Guest(s)