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 me please
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#3
RE: (script) help me please

(02-25-2012, 03:39 PM)SilentStriker Wrote:
(02-25-2012, 03:23 PM)eddyed123 Wrote: i am very new to scripting and i cant see what i have done wrong. im trying to make a door slam behind me and the game keeps crashing. it says "unexpected token "{" ". If anyone can help i would be very grateful.

void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i< 0;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}

{
AddEntityCollideCallback("Player", , "ScriptArea_1", "CollideScriptArea", true, 1);
}

void CollideScriptArea(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door_2", true, true);
StartPlayerLookAt("Door_2", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");
}

void StopLook(string &in asTimer)
{

void StopPlayerLookAt();
}
It should look like this


void OnStart()
{

if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}

AddEntityCollideCallback("Player", , "ScriptArea_1", "CollideScriptArea", true, 1);
}

void CollideScriptArea(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Door_2", true, true);
StartPlayerLookAt("Door_2", 10.0f, 10.0f, "");
AddTimer("", 1.0f, "stoplook");

}

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}
Fix'd.


02-25-2012, 03:48 PM
Find


Messages In This Thread
(script) help me please - by eddyed123 - 02-25-2012, 03:23 PM
RE: (script) help me please - by SilentStriker - 02-25-2012, 03:39 PM
RE: (script) help me please - by Obliviator27 - 02-25-2012, 03:48 PM
RE: (script) help me please - by eddyed123 - 02-25-2012, 03:50 PM
RE: (script) help me please - by Obliviator27 - 02-25-2012, 03:52 PM
RE: (script) help me please - by eddyed123 - 02-25-2012, 04:00 PM
RE: (script) help me please - by Obliviator27 - 02-25-2012, 04:23 PM
RE: (script) help me please - by Froggit - 02-25-2012, 04:38 PM
RE: (script) help me please - by flamez3 - 02-26-2012, 10:27 AM



Users browsing this thread: 1 Guest(s)