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
Wrong script!Why!?
DIGI Byte Offline
Senior Member

Posts: 376
Threads: 20
Joined: Dec 2010
Reputation: 1
#31
RE: Wrong script!Why!?

whats the problem officer?
01-07-2011, 03:51 PM
Find
Akumasama Offline
Member

Posts: 122
Threads: 2
Joined: Nov 2010
Reputation: 0
#32
RE: Wrong script!Why!?

AddEntityCollideCallback("Player", "LostArea", "LostArea", true, 1);
Same function- and objectname.
01-07-2011, 07:02 PM
Find
toni1998 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Jan 2011
Reputation: 0
#33
RE: Wrong script!Why!?

Please help me
FATAL ERROR could not load script file
/......./...hps
main(13, 11) :err :expected(
My Script

void OnStart()
{
//Collide Areas
AddEntityCollideCallback("Player", "GruntArea", "CollideGrunt", true, 1);
AddEntityCollideCallback("Player", "BruteArea", "CollideBrute", true, 1);
AddEntityCollideCallback("Player", "DeadArea", "CollideDead", true, 1);
AddEntityCollideCallback("Player", "LostArea", "CollideLost", true, 1);
//Usable Items
AddUseItemCallback("", "LivingKey", "LivingDoor", "UseKey1", true);
AddUseItemCallback("", "CristalKey", "CristalDoor", "UseKey2", true);
AddUseItemCallback("", "EscapeKey", "EscapeDoor", "UseKey3", true);
}
End Grunt Close mansion_4
End Brute Close CristalDoor
////////////////////////////
//Run when entering map
void OnEnter()
{

}

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

}
01-08-2011, 09:00 PM
Find
Tottel Offline
Senior Member

Posts: 307
Threads: 9
Joined: Nov 2010
Reputation: 0
#34
RE: Wrong script!Why!?

End Grunt Close mansion_4
End Brute Close CristalDoor


What are those doing there? Remove them and try again.
01-08-2011, 10:00 PM
Find
toni1998 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Jan 2011
Reputation: 0
#35
RE: Wrong script!Why!?

now I do not go all the scripts and keys
What to do to go
Please someone tell me what to do
If I say something wrong with me
Please
01-08-2011, 10:20 PM
Find
toni1998 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Jan 2011
Reputation: 0
#36
RE: Wrong script!Why!?

help
fatal error .../....hps
error 7.1
my script
void OnStart()
{
AddUseCallBack("", "DulapKey_1", "Cabinet1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity);
{
SetSwingCabinetLocked("Cabinet1", false, true);
PlaySoundAtEntity("", "unlocked_cabinet", "Cabinet1", 0, false)
RemoveItem("DulapKey_1"
}
help my please
(This post was last modified: 02-10-2011, 10:50 AM by toni1998.)
02-10-2011, 10:36 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#37
RE: Wrong script!Why!?

If you can give us the exact row of the error, we'd gladly help.

But I think the function you used is not AddUseCallBack, it should be AddUseItemCallback
http://wiki.frictionalgames.com/hpl2/amn..._functions

02-10-2011, 01:26 PM
Website Find
Oscar House Offline
Senior Member

Posts: 302
Threads: 3
Joined: Nov 2010
Reputation: 9
#38
RE: Wrong script!Why!?

void OnStart()
{
AddUseItemCallBack("", "DulapKey_1", "Cabinet1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Cabinet1", false, true);
PlaySoundAtEntity("", "unlocked_cabinet", "Cabinet1", 0, false);
RemoveItem("DulapKey_1");
}

Fixed:
1. AddUseItemCallBack
2. Functions don't have a ; at the end
3. No such function as SetSwingCabinetLocked
4. Forgot the semicolon after PlaySoundAtEntity
5. Forgot ); after RemoveItem

[Image: 2exldzm.png]
(This post was last modified: 02-10-2011, 03:29 PM by Oscar House.)
02-10-2011, 03:28 PM
Find
Janni1234 Offline
Member

Posts: 134
Threads: 24
Joined: Jan 2011
Reputation: 1
#39
RE: Wrong script!Why!?

You forgot "Item"
AddUseItemCallback
02-10-2011, 06:43 PM
Find
toni1998 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Jan 2011
Reputation: 0
#40
RE: Wrong script!Why!?

fatal error
9.1 unexpeted '{'

void OnStart()

{
AddUseItemCallBack("", "DulapKey_1", "Cabinet1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked("Cabinet1", false, true);
PlaySoundAtEntity("", "unlocked_cabinet", "Cabinet1", 0, false);
RemoveItem("DulapKey_1");
}
(This post was last modified: 02-10-2011, 08:02 PM by toni1998.)
02-10-2011, 07:55 PM
Find




Users browsing this thread: 2 Guest(s)