MacKetchup
Junior Member
Posts: 25
Threads: 10
Joined: Apr 2013
Reputation:
0
|
I need help fast
void OnStart()
{
AddUseItemCallback("", "nyckel", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", true, false);
PlaySoundAtEntity("","unlock_door.snt", "mansion_1" ,0 ,false);
RemoveItem("nyckel");
GiveSanityBoostSmall();
}
void OnEnter(){
{
}
void OnLeave()
{
}
void OnGameStart(){ }
{
}
Whats wrong with the code , i could need some help i have tried this now for over 3 hours
|
|
04-17-2013, 08:58 PM |
|
7heDubz
Posting Freak
Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation:
41
|
RE: I need help fast
(04-17-2013, 08:58 PM)MacKetchup Wrote: void OnStart()
{
AddUseItemCallback("", "nyckel", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", true, false);
PlaySoundAtEntity("","unlock_door.snt", "mansion_1" ,0 ,false);
RemoveItem("nyckel");
GiveSanityBoostSmall();
}
void OnEnter(){
{
}
void OnLeave()
{
}
void OnGameStart(){ }
{
}
Whats wrong with the code , i could need some help i have tried this now for over 3 hours
VERY basic scripting error
void OnEnter() {
{
}
void OnLeave()
{
}
void OnGameStart() { }
{
}
The highlighted text does not belong here. delete it from script. Your new script should look like this.
void OnStart()
{
AddUseItemCallback("", "nyckel", "mansion_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", true, false);
PlaySoundAtEntity("","unlock_door.snt", "mansion_1" ,0 ,false);
RemoveItem("nyckel");
GiveSanityBoostSmall();
}
void OnEnter()
{
}
void OnLeave()
{
}
void OnGameStart()
{
}
(This post was last modified: 04-17-2013, 09:09 PM by 7heDubz.)
|
|
04-17-2013, 09:07 PM |
|
Streetboat
Posting Freak
Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation:
56
|
RE: I need help fast
void OnEnter() doesn't need that extra { after it, and void OnGameStart() is unnecessary, you can remove that whole section.
Ninja'd!
(This post was last modified: 04-17-2013, 09:09 PM by Streetboat.)
|
|
04-17-2013, 09:07 PM |
|
7heDubz
Posting Freak
Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation:
41
|
RE: I need help fast
I'm Blank.
(This post was last modified: 01-12-2014, 08:47 AM by 7heDubz.)
|
|
04-17-2013, 09:10 PM |
|
MacKetchup
Junior Member
Posts: 25
Threads: 10
Joined: Apr 2013
Reputation:
0
|
RE: I need help fast
The Problem still exists , i have copied the code from the Nice Celt, but the problem still remains and it keep saying i cant use the key on the door which makes me wanna smash something.
Reguards MacKetchup
(04-18-2013, 04:05 PM)MacKetchup Wrote: The Problem still exists , i have copied the code from the Nice Celt, but the problem still remains and it keep saying i cant use the key on the door which makes me wanna smash something.
Reguards MacKetchup I Was stupid enough to change the hps to a diffrent name then the actual map , that was the problem, but thanks for the help
Reguards MacKetchup
(This post was last modified: 04-18-2013, 04:10 PM by MacKetchup.)
|
|
04-18-2013, 04:05 PM |
|
7heDubz
Posting Freak
Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation:
41
|
RE: I need help fast
(04-18-2013, 04:05 PM)MacKetchup Wrote: The Problem still exists , i have copied the code from the Nice Celt, but the problem still remains and it keep saying i cant use the key on the door which makes me wanna smash something.
Reguards MacKetchup
(04-18-2013, 04:05 PM)MacKetchup Wrote: The Problem still exists , i have copied the code from the Nice Celt, but the problem still remains and it keep saying i cant use the key on the door which makes me wanna smash something.
Reguards MacKetchup I Was stupid enough to change the hps to a diffrent name then the actual map , that was the problem, but thanks for the help
Reguards MacKetchup
Haha, its okay i'm sure i've done something along those lines before as well
Regards*
(This post was last modified: 09-03-2015, 05:39 AM by 7heDubz.)
|
|
04-28-2013, 10:05 PM |
|
|