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 Fatal Error
TheFakeSilhouette Offline
Junior Member

Posts: 3
Threads: 1
Joined: Oct 2012
Reputation: 0
#1
Script Fatal Error

I need some help with this, I'm new so I don't know what's wrong.
Whenever I start up my custom story I get this error message:

FATAL ERROR: Could not load script file 'custom_stories/Map Test 3/maps/test.hps'!
main (4,2) : ERR : No matching signatures to
'AddUseItemCallBack(string@&, string@&, string@&, string@&, const bool)'
main (5,2) : ERR : No matching signatures to
'AddUseItemCallBack(string@&, string@&, string@&, string@&, const bool)'
main(27,22) : ERR : Expected')' or ','

This is what I have gotten so far:


void OnStart()
{
SetLocalVarInt("DoorLocked", 1);
AddUseItemCallBack("", "key_laboratory_1", "level_wood_1", "UsedKeyOnDoor", true);
AddUseItemCallBack("", "key_tomb_1", "mansion_2", "UsedKeyOnDoor2", true);
SetEntityPlayerInteractCallback("mansion_2", "UsedKeyOnDoor3", false);
}

void OnEnter()
{

}

void OnLeave()
{

}

void UsedKeyOnDoor(string &in asitem, string &in asdoor)
{
SetLevelDoorLocked("level_wood_1", false);
PlayGuiSound("unlock_door.snt", 100);
RemoveItem("key_laboratory_1);
}
void UsedKeyOnDoor2(string &in asitem, string &in asdoor)
{
SetSwingDoorLocked("mansion_2", false, true);
PlayGuiSound("unlock_door.snt", 100")
RemoveItem("key_tomb_1");
SetLocalVarInt("DoorLocked", 0);
}
void UsedKeyOnDoor3(string &in asEntity)
{
if(GetLocalVarInt("DoorLocked") == 1)
{
SetMessage("Messages", "Doorlock2", 3);
}
}
(This post was last modified: 10-23-2012, 05:42 AM by TheFakeSilhouette.)
10-23-2012, 04:03 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Script Fatal Error

Hello! In the line:

RemoveItem("key_laboratory_1);

You missed the closing quotation mark (the one on the right side of key_laboratory_1). Also, you misspelled the function: AddUseItemCallBack, the B should not be capitalized; Callback is one word.




Hope that helped

I rate it 3 memes.
10-23-2012, 04:13 AM
Find
TheFakeSilhouette Offline
Junior Member

Posts: 3
Threads: 1
Joined: Oct 2012
Reputation: 0
#3
RE: Script Fatal Error

Thanks, that helped.

Though now I have another problem, on start up it does this:

FATAL ERROR: Could not load script file 'custom_stories/Map Test 3/maps/test.hps'!
main (38,2) : ERR : Unexpected end of file
10-23-2012, 05:20 AM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#4
RE: Script Fatal Error

Ah, got it:

PlayGuiSound("unlock_door.snt", 100") Remove the quotation after the 100.

I rate it 3 memes.
10-23-2012, 05:27 AM
Find
TheFakeSilhouette Offline
Junior Member

Posts: 3
Threads: 1
Joined: Oct 2012
Reputation: 0
#5
RE: Script Fatal Error

Awesome, thanks for your help!

It's working now. Big Grin
10-23-2012, 05:39 AM
Find




Users browsing this thread: 3 Guest(s)