A script error
This script is vital for the entertainment and there's an error
void OnStart()
{
AddEntityCollideCallback("Player", "Identify", "CollideIdentify", true, 1);
AddEntityCollideCallback("Player", "Suspicion", "CollideSuspicion", true, 1);
SetEntityPlayerInteractCallback("Note06", "NoteText", true);
SetEntityPlayerInteractCallback("Locked_1", "DoorText", true);
SetEntityPlayerInteractCallback("Thingy_1", "MonsterSpawn", true);
SetEntityPlayerInteractCallback("BlockingDoorBox_1", "UnblockDoor", true);
AddUseItemCallback("", "OhMyGodKey_1", "OhMyGod_1", "UsedKeyOnDoor", true);
AddCombineCallback("", "Potion_1", "Potion_2", CombineChem, true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void CollideSuspicion(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("UnspokenWordsReference_1", 3.5f, 3.5f, "TimeReference");
AddTimer("TimeReference", 2.0f, "TimeReference");
SetMessage("StorageArea2", "Suspicion", 0);
}
void TimeReference(string &in asTimer)
{
StopPlayerLookAt();
AddQuest("quest5", "Quest5");
}
void NoteText(string &in asEntity)
{
SetMessage("StorageArea2", "NoteText", 0);
}
void MonsterSpawn(string &in asEnity);
{
SetEntityActive("MyNameIsBob_1", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("OhMyGod_1", true);
PlaySoundAtEntity("", "unlock_door.snt", "OhMyGod_1", 0, false);
}
void LockedText(string &in asEntity)
{
SetMessage("StorageArea2", "LockedText", 0);
}
void UnblockDoor(string &in asEntity)
{
SetSwingDoorLocked("Locked_1", false, true);
}
void CollideIdentify(string &in asParent, string &in asChild, int alState)
{
SetMessage("StorageArea2", "Identify", 0);
StartPlayerLookAt("BlockingDoorBox_1", 3.5f, 3.5f, "TimeRealise");
AddTimer("TimeRealise", 1.0f, "TimeRealise");
}
void TimeRealise(string &in asTimer)
{
StopPlayerLookAt();
}
///////////////////////////////////////////////////////
//BEGIN EPOXY SCRIPT//////////////////////////////////
void CombineChem(string &in asItemA, string &in asItemB)
{
PlaySoundAtEntity("", "puzzle_acid.snt", "Player", 0, false);
GiveItem("", "chemical_container_epoxy", "Epoxy_1", "chemical_container_epoxy.tga", 1);
AddUseItemCallback("", "Epoxy_1", "BoomScript_1", "LeBigBoom", true);
}
void LeBigBoom(string &in asItem, string &in asEntity)
{
StartPlayerLookAt("ChemJar_1", 1.5f, 1.5f, "Timer1");
SetEntityActive("ChemJar_1", true);
RemoveItem("Epoxy_1");
AddTimer("Timer1", 0.8f, "TimerLookAt");
AddTimer("Timer2", 3.0f, "TimerExplosion");
PlaySoundAtEntity("", "12_epoxy_blow.snt", "ChemJar_1", 0, false);
PlaySoundAtEntity("", "puzzle_place_jar.snt", 0 ,false);
SetMessage("StorageArea2", "Panic", 0);
}
void TimerLookAt(string& asTimer)
{
StopPlayerLookAt()
}
void TimerExplosion(string& asTimer)
{
PlaySoundAtEntity("", "explosion_rock_large.snt", "cave_in_1", 0, false);
SetEntityActive("cave_in_1", false);
SetEntityActive("ChemJar_1" false);
}
//END EPOXY SCRIPT///////////////////////////////////
////////////////////////////////////////////////////
It comes up with the error
40,1:UNEXPECTED TOKEN "{"
"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 09-01-2011, 05:06 PM by ObsidianLegion.)
|