The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Unlocking Door Script
Zebby Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2012
Reputation: 0
#1
Unlocking Door Script

Is something wrong with this code? A message everytime I start the custom story comes up:

FATAL ERROR: Could not load script file ‘custom_stories/Evergreen/maps/Small
House.hps’!



Main (9, 1) : ERR: Unexpected token ‘{‘

This is all the code:


////////////////////////////
// Run first time starting map

void OnStart()

{

AddUseItemCallback("", "Bedroom_Key_1", "Bedroom_Door_1", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity);

{

SetSwingDoorLocked("Bedroom_Door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Bedroom_Door_1", 0, false);
RemoveItem("Bedroom_Key_1");

}

////////////////////////////
// Run when entering map

void OnEnter()

{

}

////////////////////////////
// Run when leaving map

void OnLeave()

{

}


I have tried using these tutorials to help, but so far they have not.

http://www.youtube.com/watch?v=ABI7NUqkX...re=related

http://www.youtube.com/watch?v=3vn9MhoRF...re=related
Could someone check the code for me please? Confused



03-25-2012, 08:32 PM
Find


Messages In This Thread
Unlocking Door Script - by Zebby - 03-25-2012, 08:32 PM
RE: Unlocking Door Script - by ClayPigeon - 03-25-2012, 08:37 PM
RE: Unlocking Door Script - by Zebby - 03-25-2012, 08:40 PM
RE: Unlocking Door Script SOLVED - by ClayPigeon - 03-25-2012, 08:41 PM



Users browsing this thread: 1 Guest(s)