MrWiickeN
Junior Member
Posts: 1
Threads: 1
Joined: Mar 2012
Reputation:
0
|
Unexpected end of file? plz help..
Here is my hole scipt, but it sas: Unexpected end of file 177,1 ERR
void OnStart()
{
AddUseItemCallback("", "key_3", "mansion_3", "KeyOnDoor", true);
AddUseItemCallback("", "key_4", "mansion_4", "KeyOnDoor1", true);
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "script_slam1", "func_slam1", true, 1);
AddEntityCollideCallback("Player", "script_slam2", "func_slam2", true, 1);
AddEntityCollideCallback("Player", "script_slam3", "func_slam3", true, 1);
SetEntityConnectionStateChangeCallback("lever1", "func_shelf");
SetEntityCallbackFunc("monsterkey", "OnPickup");
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_2", "HolyJesus2", true, 1);
AddEntityCollideCallback("Jesus_2", "FlyingJesus_2", "Sound2", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_3", "HolyJesus3", true, 1);
AddEntityCollideCallback("Jesus_3", "FlyingJesus_3", "Sound3", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_4", "HolyJesus4", true, 1);
AddEntityCollideCallback("Jesus_4", "FlyingJesus_4", "Sound4", true, 1);
AddEntityCollideCallback("Player", "Staty1", "Sound1", true, 1);
AddEntityCollideCallback("Player", "soundarea", "Sound5", true, 1);
AddEntityCollideCallback("Player", "soundarea1", "Sound6", true, 1);
AddEntityCollideCallback("Player", "BarrelArea_1", "HolyBarrel1", true, 1);
AddEntityCollideCallback("barrel01_14", "BarrelArea_1", "Sound7", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("key_3");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("key_4");
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_10", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_8", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam2(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_11", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam3(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_9", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secretdoor1",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster1", true);
ShowEnemyPlayerPosition("monster1");
}
void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}
void OnEnter()
{
}
void OnLeave()
{
}
void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_1", true);
AddPropForce("Jesus_1", 0, 0, 0, "World");
}
void HolyJesus2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_2", true);
AddPropForce("Jesus_2", 0, 0, 0, "World");
}
void Sound1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void HolyJesus3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_3", true);
AddPropForce("Jesus_3", 0, 0, 0, "World");
}
void HolyJesus4(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_4", true);
AddPropForce("Jesus_4", 0, 0, 0, "World");
}
void Sound5(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_human_noices.snt", "soundarea", 0, false);
}
void Sound6(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_baby_cry.snt", "soundarea1", 0, false);
}
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("barrel01_14", true);
AddPropForce("barrel01_14", 0, 0, 0, "World");
}
(This post was last modified: 03-02-2012, 08:06 PM by Your Computer.)
|
|
03-02-2012, 06:17 PM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
RE: Unexpected end of file? plz help..
(03-02-2012, 06:17 PM)MrWiickeN Wrote: Here is my hole scipt, but it sas: Unexpected end of file 177,1 ERR
void OnStart()
{
AddUseItemCallback("", "key_3", "mansion_3", "KeyOnDoor", true);
AddUseItemCallback("", "key_4", "mansion_4", "KeyOnDoor1", true);
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
AddEntityCollideCallback("Player", "script_slam1", "func_slam1", true, 1);
AddEntityCollideCallback("Player", "script_slam2", "func_slam2", true, 1);
AddEntityCollideCallback("Player", "script_slam3", "func_slam3", true, 1);
SetEntityConnectionStateChangeCallback("lever1", "func_shelf");
SetEntityCallbackFunc("monsterkey", "OnPickup");
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_1", "HolyJesus", true, 1);
AddEntityCollideCallback("Jesus_1", "FlyingJesus_1", "Sound", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_2", "HolyJesus2", true, 1);
AddEntityCollideCallback("Jesus_2", "FlyingJesus_2", "Sound2", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_3", "HolyJesus3", true, 1);
AddEntityCollideCallback("Jesus_3", "FlyingJesus_3", "Sound3", true, 1);
AddEntityCollideCallback("Player", "FlyingJesus_4", "HolyJesus4", true, 1);
AddEntityCollideCallback("Jesus_4", "FlyingJesus_4", "Sound4", true, 1);
AddEntityCollideCallback("Player", "Staty1", "Sound1", true, 1);
AddEntityCollideCallback("Player", "soundarea", "Sound5", true, 1);
AddEntityCollideCallback("Player", "soundarea1", "Sound6", true, 1);
AddEntityCollideCallback("Player", "BarrelArea_1", "HolyBarrel1", true, 1);
AddEntityCollideCallback("barrel01_14", "BarrelArea_1", "Sound7", true, 1);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("key_3");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveItem("key_4");
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_10", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam1(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_8", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam2(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_11", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_slam3(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_9", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(1.0f, true);
}
void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secretdoor1",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("monster1", true);
ShowEnemyPlayerPosition("monster1");
}
void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("pot_explode", 0);
}
void OnEnter()
{
}
void OnLeave()
{
}
void HolyJesus(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_1", true);
AddPropForce("Jesus_1", 0, 0, 0, "World");
}
void HolyJesus2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_2", true);
AddPropForce("Jesus_2", 0, 0, 0, "World");
}
void Sound1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
void HolyJesus3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_3", true);
AddPropForce("Jesus_3", 0, 0, 0, "World");
}
void HolyJesus4(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Jesus_4", true);
AddPropForce("Jesus_4", 0, 0, 0, "World");
}
void Sound5(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_human_noices.snt", "soundarea", 0, false);
}
void Sound6(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_baby_cry.snt", "soundarea1", 0, false);
}
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("barrel01_14", true);
AddPropForce("barrel01_14", 0, 0, 0, "World");
} {
if (alState == 1)
{
SetMoveObjectState("secretdoor1",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
}
chane it to
{
if (alState == 1)
}
{
SetMoveObjectState("secretdoor1",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "shelf_move_1", 0, false);
return;
}
and chanage
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("barrel01_14", true);
AddPropForce("barrel01_14", 0, 0, 0, "World");
}
to
void HolyBarrel1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("barrel01_14", true);
AddPropForce("barrel01_14", 0, 0, 0, "World");
}
(This post was last modified: 03-02-2012, 08:57 PM by jessehmusic.)
|
|
03-02-2012, 08:26 PM |
|
|