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
Script Help Basic Light change wont work... please help
reper1210 Offline
Junior Member

Posts: 18
Threads: 7
Joined: Mar 2012
Reputation: 0
#1
Basic Light change wont work... please help

I'm new to scripting and i've tired for three days to get a single light to go out when i walk into a specified area and i keep getting this error...


FATAL ERROR: Could not load script file 'custom_stories/confined/Maps/confined.hps'!
main (3, 1) : ERR : No matching signatures to 'AddEntityCollideCallback(string@&, string@&, string@&, string@&)'
main (19, 28) : ERR : Expected '('


And this is my script...


void OnStart()
{
AddEntityCollideCallback("Enter","Player","ScriptArea_1","TurnOffLight");
AddDebugMessage("OnStart!", false);
}

void OnEnter()
{
AddDebugMessage("OnEnter!", false);
}

void OnLeave()
{
AddDebugMessage("OnLeave!", false);
}

void TurnOffLight(string asParent, string asChild)
{
void SetLightVisible(string& Light, true);
}

In game i have an area called "ScriptArea_1" and a ceiling lamp called "Light". I've been following tutorials all over frictional games and i tried to do the tutorial "5.1 scripting a light" the exact way and that didn't work and could not find matching signatures either or w/e.
This script does function because the debugging works and before i tested auto changing maps and giving my a lantern to start with with also both worked.

I appreciate any help in advance if anyone is will to try and solve this.
03-29-2012, 06:08 PM
Find


Messages In This Thread
Basic Light change wont work... please help - by reper1210 - 03-29-2012, 06:08 PM



Users browsing this thread: 1 Guest(s)