Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 3 Vote(s) - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My problems
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#51
RE: My problems

When i deleted the last line i got another similar error

[Image: uHcBi.png]

I'll try to undo the script and see the problem like you told me.
10-19-2012, 03:51 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#52
RE: My problems

Line 257?

Post the script file again (the way it is right now), in spoiler tags. I need to see it all clearly.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-19-2012, 03:54 PM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#53
RE: My problems

Spoiler below!
void OnStart()

{
AddEntityCollideCallback("Player", "Message_7", "Message7", true, 1);
AddEntityCollideCallback("Player", "Message_8", "Message8", true, 1);
AddUseItemCallback("", "orb_door1", "orbchamber1_1", "KeyOnDoor111", true);
AddUseItemCallback("", "orb_door2", "orbchamber1_2", "KeyOnDoor1111", true);
AddUseItemCallback("", "Key_3", "Prison_11", "KeyOnDoor11", true);
SetLocalVarInt("Var1", 0);
SetEntityPlayerInteractCallback("button1", "func1", true);
SetEntityPlayerInteractCallback("button2", "func2", true);
SetEntityPlayerInteractCallback("button3", "func3", true);
AddEntityCollideCallback("Player", "Message_4", "Message4", true, 1);
AddEntityCollideCallback("Player", "Message_6", "Message6", true, 1);
AddEntityCollideCallback("Player" , "brutetrap_scriptarea" , "MonsterFunc1" , true , 1);
AddEntityCollideCallback("Player" , "grunttrap_scriptarea" , "MonsterFunc2" , true , 1);
AddEntityCollideCallback("Player" , "body_trap_script_area" , "bodytrapfunc" , true , 1);
PreloadSound("brutetrapsound.ogg");
AddEntityCollideCallback("Player", "brutetrapsoundarea", "Sound", true, 1);
AddEntityCollideCallback("Player", "Message_5", "Message5", true, 1);
AddEntityCollideCallback("Player", "Message_3", "Message3", true, 1);
AddEntityCollideCallback("Player", "slamdoor", "func_slam", true, 1);
AddEntityCollideCallback("Player", "slamdoor2", "func_slam2", true, 1);
AddEntityCollideCallback("Player", "Play_Music_Script_Area", "PlayMusic1", true, 1);
AddEntityCollideCallback("Player", "KillTheLights", "LightsOut", true, 1);
AddUseItemCallback("", "crowbar_1", "mansiondoor_1", "UsedCrowbarOnDoor", true);
AddEntityCollideCallback("crowbar_joint_1", "ScriptArea_1", "CollideAreaBreakDoor", true, 1);
SetEntityCallbackFunc("des_orb", "OnPickup125");
AddUseItemCallback("", "des_orb", "Map_3_go", "UsedKeyOnDoor125", true);
}

void UsedCrowbarOnDoor(string &in asItem, string &in asEntity)
{
AddTimer("", 0.2, "TimerSwitchShovel");
RemoveItem("crowbar_1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Map_3_go", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Map_3_go", 0, false);
RemoveItem("key_1");
}

void OnPickup125(string &in asEntity, string &in type)
{
SetEntityActive(servant_brute_125", true);
ShowEnemyPlayerPosition("servant_brute_125");
}

void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt", "", 0, false);
SetEntityActive("crowbar_joint_1", true);
}


void CollideAreaBreakDoor(string &in asParent, string &in asChild, int alState)
{
AddPlayerSanity(25);
PlayMusic("10_puzzle01.ogg", false, 0.7, 0.1, 10, false);
SetSwingDoorLocked("mansiondoor_1", false, true);
AddPropImpulse("mansiondoor_1", 0, 0, -50, "World");
SetSwingDoorDisableAutoClose("mansiondoor_1", true);
SetSwingDoorClosed("mansiondoor_1", false, false);
SetMoveObjectState("mansiondoor_1", 1);
PlaySoundAtEntity("","break_wood_metal", "AreaBreakEffect", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood", "AreaBreakEffect", false);
SetEntityActive("crowbar_joint_1", false);
SetLocalVarInt("Door", 1);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////

void bodytrapfunc(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("body_trap" , true);
GiveSanityDamage(5.0f, true);
}

void PlayMusic1(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Ambience.ogg", true, 1, 1, 0, false);
}

void PlayMusic(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("sound", "brutetrapsound.ogg", "brutetrapsoundarea", 0.0, false);
}

void LightsOut(string &in asParent, string &in asChild, int alState)
{
SetLampLit("lamp_1", false, true);
AddTimer("", 0.1, "Out2");
}


void Out2(string &in asTimer)
{
SetLampLit("lamp_2", false, true);
AddTimer("", 0.1, "Out3");
}


void Out3(string &in asTimer)
{
SetLampLit("lamp_3", false, true);
AddTimer("", 0.1, "Out4");
}


void Out4(string &in asTimer)
{
SetLampLit("lamp_4", false, true);
AddTimer("", 0.1, "Out5");
}


void Out5(string &in asTimer)
{
SetLampLit("lamp_5", false, true);
AddTimer("", 0.1, "Out6");
}


void Out6(string &in asTimer)
{
SetLampLit("lamp_6", false, true);
}

void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("brutetrap" , true);
}

void MonsterFunc2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("trapgrunt3" , true);
ShowEnemyPlayerPosition("trapgrunt3");
AddTimer("", 20.0f, "GruntDisable3");
}

void GruntDisable3(string &in asTimer)
{
SetEntityActive("trapgrunt3", false);
SetMessage("Messages", "Popup7", 0);
}

void KeyOnDoor11(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Prison_11", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "Prison_11", 0.0f, true);
RemoveItem("key_3");
}

void KeyOnDoor111(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("orbchamber1_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "orbchamber1_1", 0.0f, true);
Removeitem("orb_door1");
}

void KeyOnDoor1111(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("orbchamber1_2", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "orbchamber1_2", 0.0f, true);
RemoveItem("orb_door2");
}

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

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

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

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

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

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("doorman", true, true);

SetSwingDoorLocked("doorman", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}

void func_slam2(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("orbchamber1_2", true, true);

SetSwingDoorLocked("orbchamber1_2", true, true);

PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(5.0f, true);
}

void func1(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func2(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func3(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func4(string &in asEntity)
{
AddLocalVarInt("Var1", 1);
func5();
}

void func5()
{
if(GetLocalVarInt("Var1") == 3)
{
SetSwingDoorLocked("doorman", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "doorman", 0.5f, false);
AddPlayerSanity(10);
}}

I think it happened when i added the use of the knife on the pig that gives you the key. :S
10-19-2012, 03:56 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#54
RE: My problems

Again, no line 257. Place the 2nd bracket there below the other one. If that doesn't work, remove the newest function that you added (while the map was still working).

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-19-2012, 03:58 PM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#55
RE: My problems

I'm lost , i have no idea which was my newest function , i was working on my first map when i was done with the second one.
And i have no idea what to do
10-19-2012, 04:21 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#56
RE: My problems

(10-19-2012, 04:21 PM)naseem142 Wrote: I'm lost , i have no idea which was my newest function , i was working on my first map when i was done with the second one.
And i have no idea what to do
Recheck the script letter by letter, start to end.

If not work, redo the script from scratch. It may be the best option.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-19-2012, 04:23 PM
Website Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#57
RE: My problems

By the way , what do you mean something could be missing?
10-19-2012, 04:26 PM
Website Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#58
RE: My problems

(10-19-2012, 04:26 PM)naseem142 Wrote: By the way , what do you mean something could be missing?
Let's say this script. I used an ex.

AddTimer("", 4.0f, "TimerEvent");

By missing, it could be:

AddTimer("" 4.0f, "TimerEvent");
or
AddTimer("", 4.0f "TimerEvent");
or
AddTimer("", 4.0f, "TimerEvent")


See the difference?

That's how things "miss".

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 10-19-2012, 04:29 PM by Robby.)
10-19-2012, 04:29 PM
Website Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#59
RE: My problems

When it says "Unexpected end of file" is because there is a missing bracket. Is the worse error you can get, because you have to inspect every single letter of the script.

I've also noticed a high amount of AddEntityCollideCallbacks. Why is that?

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
10-19-2012, 04:30 PM
Find
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#60
RE: My problems

I have to check every letter ... oh god
10-19-2012, 04:35 PM
Website Find




Users browsing this thread: 1 Guest(s)