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
Bit of an issue with my script
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#1
Bit of an issue with my script

There seems to be a problem with my script that when I enter the map it gives me this error:
Quote: (1,1): ERR: No matching signatures to 'OnGameStart()' main (29,2): ERR : Unexpected end of file

Now I've never seen the 'OnGameStart(),' so I replaced my 'OnStart()' line to 'OnGameStart().' So now my script looks like this:
Quote:////////////////////////////
// Run when entering map
void OnGameStart()
{
SetEntityConnectionStateChangeCallback("lever_small01_1", "SecretDoor");
AddUseItemCallback("", "key_torture_chamber_1", "castle_2", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_2", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_2", 0, false);
RemoveItem("key_torture_chamber_1");
}

void SecretDoor(string &in asEntity, int alState)
{
if (alState == -1)
{
SetMoveObjectState("castle_portcullis_1",1.0f);
PlaySoundAtEntity("", "quest_completed.snt", "close_gate", 0, false);
return;
}
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
However I'm still getting the same error and I have no idea what to do. If anyone knows what to do the help would be appreciated. Also I did do a search on "OnGameStart()' on the wiki and didn't find anything but like I said, if anyone could point me in the right direction it'd be appreciated.

(This post was last modified: 02-27-2012, 07:27 PM by A Tricky Carnie.)
02-27-2012, 06:08 PM
Find


Messages In This Thread
Bit of an issue with my script - by A Tricky Carnie - 02-27-2012, 06:08 PM



Users browsing this thread: 1 Guest(s)