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
Script help
tezpull666 Away
Banned

Posts: 286
Threads: 15
Joined: May 2013
#1
Script help

void OnStart()
{
AddUseItemCallback("", "key_tomb_rusty_1", "level_wood_1", "FUNCTION", true);
}

PHP Code: (Select All)
void OnEnter()


}

void OnLeave()


}

void FUNCTION(string &in asItemstring &in asEntity)
{
    
SetLevelDoorLocked(''level_wood_1''false);
    
PlayGuiSound("unlock_door.snt"door0false);
    
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
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: Script help

Should there be a pair of two single quotes in SetLevelDoorLocked, instead of "level_wood"?
05-26-2013, 07:26 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
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 Smile

Discord: Romulator#0001
[Image: 3f6f01a904.png]
05-27-2013, 10:25 AM
Find
tezpull666 Away
Banned

Posts: 286
Threads: 15
Joined: May 2013
#4
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 Smile
How can i do that??
05-27-2013, 03:41 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#5
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
Find
tezpull666 Away
Banned

Posts: 286
Threads: 15
Joined: May 2013
#6
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:

[Image: WhXEfQy.png]
(This post was last modified: 05-27-2013, 06:17 PM by tezpull666.)
05-27-2013, 06:07 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#7
RE: Script help

So is there actually a door called "level_wood_1" in your map?
05-27-2013, 06:16 PM
Find
tezpull666 Away
Banned

Posts: 286
Threads: 15
Joined: May 2013
#8
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
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#9
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
Find
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#10
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
Find




Users browsing this thread: 1 Guest(s)