The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
RE: Adding mementos to locked doors?
That means to be that there's a missing bracket, ;, or parenthesis.
THE OTHERWORLD (WIP)
Aculy iz dolan.
11-05-2012, 02:33 PM
Tiger
Posting Freak
Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation:
55
RE: Adding mementos to locked doors?
(11-05-2012, 02:33 PM) The chaser Wrote: That means to be that there's a missing bracket, ;, or parenthesis.Ok, thanks. I will check through the script
11-05-2012, 04:03 PM
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
RE: Adding mementos to locked doors?
If you can't find it, post the script here. The whole script
Trying is the first step to success.
11-05-2012, 04:29 PM
Tiger
Posting Freak
Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation:
55
RE: Adding mementos to locked doors?
ok, here it is:
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "ChangeLevelScript_1", "ChangeMap_1", true, 1);
}
void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
{
ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");
}
if(GetSwingDoorLocked("BlockedDoor") == true);
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}
void OnEnter()
{
SetSkyBoxActive(true);
SetSkyBoxTexture("NightSky.dds");
}
(This post was last modified: 11-05-2012, 05:34 PM by Tiger .)
11-05-2012, 05:34 PM
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
RE: Adding mementos to locked doors?
Is this your full script?
Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space
Trying is the first step to success.
11-06-2012, 11:27 AM
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
RE: Adding mementos to locked doors?
(11-05-2012, 05:34 PM) Tigerwaw Wrote: ok, here it is:
Spoiler below!
void OnStart()
{
AddEntityCollideCallback("Player", "ChangeLevelScript_1", "ChangeMap_1", true, 1);
}
void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
{
ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");
}
if(GetSwingDoorLocked("BlockedDoor") == true);
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}
void OnEnter()
{
SetSkyBoxActive(true);
SetSkyBoxTexture("NightSky.dds");
}
Hello!
ChangeMap("InsideCabin.map", "PlayerStartArea_2, "player_jump6.ogg", "player_bodyfall5.ogg");
After PlayerStartArea_2, you missed a quotation mark. If you're using notepad++ or geany (which you should be using for scripting) be sure to set the language to C++; this color codes everything and makes mistakes like that easier to point out.
Hope that helped!
I rate it 3 memes.
11-06-2012, 11:30 AM
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
RE: Adding mementos to locked doors?
(11-06-2012, 11:27 AM) beecake Wrote: Is this your full script?
Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a spaceShouldn't it be:
void ChangeMap_1 (string &in asParent, string &in asChild, int alState)
THE OTHERWORLD (WIP)
Aculy iz dolan.
11-06-2012, 12:34 PM
FlawlessHappiness
Posting Freak
Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation:
171
RE: Adding mementos to locked doors?
(11-06-2012, 12:34 PM) The chaser Wrote: (11-06-2012, 11:27 AM) beecake Wrote: Is this your full script?
Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space Shouldn't it be:
void ChangeMap_1 (string &in asParent, string &in asChild, int alState) I meant there should be space between 1 and (
Trying is the first step to success.
11-06-2012, 01:36 PM
The chaser
Posting Freak
Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation:
113
RE: Adding mementos to locked doors?
(11-06-2012, 01:36 PM) beecake Wrote: (11-06-2012, 12:34 PM) The chaser Wrote: (11-06-2012, 11:27 AM) beecake Wrote: Is this your full script?
Well the only thing i can find is: void ChangeMap_1 (string &in asParent, string &in asChild, int alState);
There shouldn't be a space Shouldn't it be:
void ChangeMap_1 (string &in asParent, string &in asChild, int alState) I meant there should be space between 1 and (It doesn't matter
A space doesn't do really anything to the script.
THE OTHERWORLD (WIP)
Aculy iz dolan.
11-06-2012, 01:53 PM
craven7
Member
Posts: 50
Threads: 8
Joined: Aug 2012
Reputation:
1
RE: Adding mementos to locked doors?
if(GetSwingDoorLocked("BlockedDoor") == true);
{
AddQuest("BlockedDoorQuest", "BlockedDoorQuest");
}
the semicolon after the condition needs to be removed.
Also (the bigger problem I guess) your if (the code I posted 2 lines above) is not in a function/methode.
If you want to add a memento to a locked door I would do it like this:
SetEntityPlayerInteractCallback("door","interactLockedDoor",true);
void interactLockedDoor(string &in item)
{
AddQuest("","lockedDoor");
}
(This post was last modified: 11-06-2012, 02:20 PM by craven7 .)
11-06-2012, 02:16 PM