tezpull666
Banned
Posts: 286
Threads: 15
Joined: May 2013
|
Script help
void OnStart()
{
AddUseItemCallback("", "key_tomb_rusty_1", "level_wood_1", "FUNCTION", true);
}
void OnEnter() {
}
void OnLeave() {
}
void FUNCTION(string &in asItem, string &in asEntity) { SetLevelDoorLocked(''level_wood_1'', false); PlayGuiSound("unlock_door.snt", door, 0, false); RemoveItem("key_tomb_rusty_1"); }
When i did this it said:
FATAL ERROR:Could not load script file 'custom_stories/the broken hell-prologue/maps/saco.hps'!
Please help
EDIT:It is now working!
(This post was last modified: 05-28-2013, 06:13 PM by tezpull666.)
|
|
05-26-2013, 07:04 PM |
|
Bridge
Posting Freak
Posts: 1,971
Threads: 25
Joined: May 2012
Reputation:
128
|
RE: Script help
Should there be a pair of two single quotes in SetLevelDoorLocked, instead of "level_wood"?
|
|
05-26-2013, 07:26 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Script help
(05-26-2013, 07:26 PM)Bridge Wrote: Should there be a pair of two single quotes in SetLevelDoorLocked, instead of "level_wood"?
That should fix it. You should also include what the error says to, so we can sort of understand what we are to look for
Discord: Romulator#0001
|
|
05-27-2013, 10:25 AM |
|
tezpull666
Banned
Posts: 286
Threads: 15
Joined: May 2013
|
RE: Script help
(05-27-2013, 10:25 AM)ROMul8r Wrote: (05-26-2013, 07:26 PM)Bridge Wrote: Should there be a pair of two single quotes in SetLevelDoorLocked, instead of "level_wood"?
That should fix it. You should also include what the error says to, so we can sort of understand what we are to look for How can i do that??
|
|
05-27-2013, 03:41 PM |
|
Bridge
Posting Freak
Posts: 1,971
Threads: 25
Joined: May 2012
Reputation:
128
|
RE: Script help
void OnEnter()
{
}
void OnLeave()
{
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false);
PlayGuiSound("unlock_door.snt", door, 0, false);
RemoveItem("key_tomb_rusty_1");
}
|
|
05-27-2013, 05:31 PM |
|
tezpull666
Banned
Posts: 286
Threads: 15
Joined: May 2013
|
RE: Script help
(05-27-2013, 05:31 PM)Bridge Wrote: void OnEnter()
{
}
void OnLeave()
{
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("level_wood_1", false);
PlayGuiSound("unlock_door.snt", door, 0, false);
RemoveItem("key_tomb_rusty_1");
}
Still doest work it said this:
(This post was last modified: 05-27-2013, 06:17 PM by tezpull666.)
|
|
05-27-2013, 06:07 PM |
|
Bridge
Posting Freak
Posts: 1,971
Threads: 25
Joined: May 2012
Reputation:
128
|
RE: Script help
So is there actually a door called "level_wood_1" in your map?
|
|
05-27-2013, 06:16 PM |
|
tezpull666
Banned
Posts: 286
Threads: 15
Joined: May 2013
|
RE: Script help
(05-27-2013, 06:16 PM)Bridge Wrote: So is there actually a door called "level_wood_1" in your map? yes
|
|
05-27-2013, 06:17 PM |
|
Bridge
Posting Freak
Posts: 1,971
Threads: 25
Joined: May 2012
Reputation:
128
|
RE: Script help
I'm not an expert on Amnesia scripting but (19, 37) should mean line 19, character 37 and your code only has 11 lines. Is this all of it?
|
|
05-27-2013, 07:05 PM |
|
Kullin
Member
Posts: 218
Threads: 23
Joined: May 2013
Reputation:
3
|
RE: Script help
The error is in line 19, And 37 the first letter of the word with a error so yea your right bridge,
But it says that it can't find the door, so make sure the door name is right. AND PRESS ENTER WHEN YOU ENTER A NAME IN THE LEVEL EDITITOR'!! Haha just so you see that!
And post the whole script, because a script. with 11 lines cant give a error on line 19. So give the whole script..
Whait a second, I just realised that on line 19 it gives a error because it says "door" in the script, do you understand what I mean? ( I know your from Germany)
|
|
05-27-2013, 07:15 PM |
|
|