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
Error when loading second map
Ubermensch Offline
Junior Member

Posts: 3
Threads: 1
Joined: Oct 2016
Reputation: 0
#1
Error when loading second map

So I just finished scripting my first map. Here's the .hps file:

Spoiler below!
void OnStart()
{
AddUseItemCallback("", "lockpick", "introcelldoor", "UseKeyOnDoor", true);
AddUseItemCallback("", "BlockBKey", "BlockB", "UseKeyOnLevelDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)

{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void UseKeyOnLevelDoor(string &in asItem, string &in asEntity)

{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "door_sewer_unlock.snt", asEntity, 0, false);
RemoveItem(asItem);
CompleteQuest("touchblockdoor", "BlockBLocked");
GiveSanityBoost();
}

void touchblockdoor(string &in asEntity)

{
AddQuest("touchblockdoor", "BlockBLocked");
}

After that, I made the .hps file for my second map. Here it is:

Spoiler below!
void OnStart()
{
SetEntityPlayerLookAtCallback("", "lookatcorpse", true);
}

void lookatcorpse(string &in asEntity, 1)

{
GiveSanityDamage(25.0f, true)
}

The issue here is that the second map does not load. Since I'm pretty new to the editor and scripting it could be a little bit silly. Anyways, the error that shows up is:

Spoiler below!
FATAL ERROR
Couldn't load (map name and directory here)
ExecuteString (1,1): ERR : No matching signatures to 'OnLeave()'
main (6, 40) : ERR : Expected data type


I did try some things, but I'm kinda lost here so any help is appreciated! Tongue

p.s: looks like I posted in the wrong section. my bad. Confused
(This post was last modified: 10-16-2016, 10:00 PM by Ubermensch.)
10-16-2016, 09:47 PM
Find


Messages In This Thread
Error when loading second map - by Ubermensch - 10-16-2016, 09:47 PM
RE: Error when loading second map - by Mudbill - 10-16-2016, 10:24 PM
RE: Error when loading second map - by Ubermensch - 10-16-2016, 10:39 PM
RE: Error when loading second map - by Mudbill - 10-17-2016, 12:24 AM
RE: Error when loading second map - by Ubermensch - 10-17-2016, 01:31 PM
RE: Error when loading second map - by Romulator - 10-17-2016, 01:52 PM



Users browsing this thread: 1 Guest(s)