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 NEED HELP WITH SCRIPT
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: NEED HELP WITH SCRIPT

(02-25-2012, 01:30 PM)stinset2 Wrote: I need some help with my script. I get a fatal error message, and it says "main (38,19) : ERR : Expected ')' or ','"
and it looks the same only with some other numbers under it.
here's the whole script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "key 1", "door", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key_tower_1", "door2", "UsedKeyOnDoor1", true);
SetEntityCallbackFunc("key_tower_1", "OnPickup");
AddEntityCollideCallback("Player", "sec", "sec", true, 1);
AddEntityCollideCallback("Player", "scary", "scary", true, 1);
AddEntityCollideCallback("table", "tablescript", "tablescript", true, 1);
AddEntityCollideCallback("enemy_suitor_1", "run", "run", true, 1);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door", false, true);
PlaySoundAtEntity("", "unlock_door", "door", 0.0f, false);
RemoveItem("key 1");
}
void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEntity("", "unlock_door", "door2", 0.0f, false);
RemoveItem("key_tower_1");
}

void OnPickup(string &in asItem, string &in asEntity)
{
SetEntityActive("character_dog_1",true);
}
void sec(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 20,0f, "running");
AddQuest("quest1","quest1");
}
void scary(string &in asTimer)
{
PlayMusic("horror1.ogg", true, 1, 1, 1, true);
SetEntityActive("deformed_man_1", true;
SetEntityActive("candlestick_floor_red_1", true;
GiveSanityDamage(5.0f, true);
AddTimer("", 2,0f, "scare1");
}
void scare1(string &in asTimer)
{
SetEntityActive("deformed_man_2", true;
SetEntityActive("candlestick_floor_red_2", true;
SetEntityActive("deformed_man_1", false;
SetEntityActive("candlestick_floor_red_1", false;
GiveSanityDamage(5.0f, true);
AddTimer("", 2,0f, "scare2");
}
void scare2(string &in asTimer)
{
SetEntityActive("deformed_man_3", true;

SetEntityActive("candlestick_floor_red_3", true;
SetEntityActive("deformed_man_2", false;
SetEntityActive("candlestick_floor_red_2", false;
GiveSanityDamage(5.0f, true);
AddTimer("", 3,0f, "scare3");
}
void scare3(string &in asTimer)
{
SetEntityActive("deformed_man_3", false;
SetEntityActive("candlestick_floor_red_3", false;
GiveSanityDamage(5.0f, true);
SetEntityActive("servant_grunt_1", true;
ShowEnemyPlayerPosition("servant_grunt_1");
}

void tablescript(string &in asTimer)
{
SetEntityActive("run", true;
}
void run(string &in asTimer)
{
SetEntityActive("enemy_suitor_1", false;
}
void running(string &in asTimer)
{
SetEntityActive("enemy_suitor_1", true;
ShowEnemyPlayerPosition("enemy_suitor_1");
GiveSanityDamage(5.0f, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
What to do?! D:
found your problem, you forgot the ) on your SetEntityActive("deformed_man_1", true);


02-25-2012, 01:34 PM
Find


Messages In This Thread
NEED HELP WITH SCRIPT - by stinset2 - 02-25-2012, 01:30 PM
RE: NEED HELP WITH SCRIPT - by SilentStriker - 02-25-2012, 01:34 PM
RE: NEED HELP WITH SCRIPT - by stinset2 - 02-25-2012, 01:44 PM
RE: NEED HELP WITH SCRIPT - by SilentStriker - 02-25-2012, 03:04 PM
RE: NEED HELP WITH SCRIPT - by stinset2 - 02-25-2012, 03:24 PM
RE: NEED HELP WITH SCRIPT - by SilentStriker - 02-25-2012, 03:34 PM
RE: NEED HELP WITH SCRIPT - by Your Computer - 02-25-2012, 06:00 PM
RE: NEED HELP WITH SCRIPT - by SilentStriker - 02-25-2012, 06:28 PM
RE: NEED HELP WITH SCRIPT - by stinset2 - 02-25-2012, 07:16 PM
RE: NEED HELP WITH SCRIPT - by flamez3 - 02-26-2012, 10:26 AM
RE: NEED HELP WITH SCRIPT - by stinset2 - 02-26-2012, 02:30 PM



Users browsing this thread: 1 Guest(s)