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
Trying to get a script to work
Akasu Offline
Member

Posts: 62
Threads: 6
Joined: Aug 2010
Reputation: 2
#1
Trying to get a script to work

This is what I've got:

void StateChangeLever(string &in asEntity, int alState)
{
if(alState == 1){
SetLeverStuckState(asEntity, 1, true);
}
}

^ This part works allright.
...

void Burn("fireplace_1",OnIgnite)
{
if(GetLeverState ("fire_lever_1") < 1){
SetLampLit("fireplace_1", false, true);
}

if(GetLeverState ("fire_lever_1") == 1){
SetLampLit("fireplace_1", true, true);
}
}

The Burn is written on the CallbackFunc-field of the fireplace_1 in the editor
It crashes when I try to start the level and gives an error like this :
"main (8,11) : ERR : expected data type"

I was trying to make a fire burn only when a specific lever had been pulled... Any ideas why it doesn't work ?
09-19-2010, 11:02 AM
Find


Messages In This Thread
Trying to get a script to work - by Akasu - 09-19-2010, 11:02 AM
RE: Trying to get a script to work - by Akasu - 09-19-2010, 03:14 PM
RE: Trying to get a script to work - by khawaja07 - 09-19-2010, 03:35 PM
RE: Trying to get a script to work - by Akasu - 09-19-2010, 05:59 PM
RE: Trying to get a script to work - by Akasu - 09-19-2010, 06:29 PM
RE: Trying to get a script to work - by Akasu - 09-19-2010, 07:14 PM



Users browsing this thread: 1 Guest(s)