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 needed! I can't find error in script.
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#5
RE: Help needed! I can't find error in script.

(02-26-2012, 02:20 PM)Tozken Wrote: Okay, so I'm kinda new to this so bear with me Tongue
I've encountered a problem that makes me unable to enter the map, but I can't seem to find the problem in the script. It says that a ';' is expected in row 29.

Here's my script:

void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
}
PlaySoundAtEntity("RockRumble", "general_rock_rumble.snt", "Player", 0, false);
StartScreenShake(0.05f, 1, 0.4, 0.6);
AddTimer("", 1, "StopRockRumble");
SetPlayerCrouching(true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Message1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "AOESanityDmg", false, 1);
}

void StopRockRumble(string &in asTimer)
{
StopSound("RockRumble", 1);
}

void Message1(string &in asParent, string &in asChild, int alState)
{
SetMessage("Messages", "Popup3", 0);
}

void AOESanityDmg(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5, false);
if(GetEntitiesCollide("Player", "ScriptArea_2"))
{
AddTimer("", 2, "AOESanityDmg");
}
}

What I want AOESanityDmg to do is if the player is located inside ScriptArea_2 he should be damaged with 5 sanity dmg every 2 seconds... I don't think that it is working but it seems like there's something else that is wrong with the script, because I removed some script before so that I didn't have 29 rows of script, but the error still remained... Anyone know how to fix it? Smile

Thx in advance
Sry for English
Dude you have this "
AddTimer("", 2, "AOESanityDmg");
}
}"

You should have


{

}

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
02-28-2012, 12:45 AM
Website Find


Messages In This Thread
RE: Help needed! I can't find error in script. - by jessehmusic - 02-28-2012, 12:45 AM



Users browsing this thread: 1 Guest(s)