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


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wrong script!Why!?
Author Message
DIGI Byte Offline
Senior Member

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

whats the problem officer?
01-07-2011 03:51 PM
Find all posts by this user Quote this message in a reply
Akumasama Offline
Member

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

AddEntityCollideCallback("Player", "LostArea", "LostArea", true, 1);
Same function- and objectname.
01-07-2011 07:02 PM
Find all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Tottel Offline
Senior Member

Posts: 307
Joined: Nov 2010
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,085
Joined: Mar 2009
Reputation: 67
Post: #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
Visit this user's website Find all posts by this user Quote this message in a reply
Oscar House Offline
Senior Member

Posts: 302
Joined: Nov 2010
Reputation: 9
Post: #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 all posts by this user Quote this message in a reply
Janni1234 Offline
Member

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

You forgot "Item"
AddUseItemCallback
02-10-2011 06:43 PM
Find all posts by this user Quote this message in a reply
toni1998 Offline
Junior Member

Posts: 13
Joined: Jan 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)