Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script error (Again)
Venom Fox Offline
Junior Member

Posts: 32
Threads: 9
Joined: Mar 2016
Reputation: 0
#21
RE: Script error (Again)

One more thing (If anyone's still around)

I put a button in my map that should light all the lights in a hallway.
The button is the button_red_glow_1 one. I added this to the connectionstatechangecallback thing in the map editor : button_glow_moving_1_OnConnectionStateChange

and I added this to my script file:

void button_glow_moving_1_OnConnectionStateChange(const tString &in asEntity, int alState)
{
if (alState==1)
{
Lamp_SetLit("ceiling_large_robot_3",
true,
true);
Lamp_SetLit("ceiling_large_robot_2",
true,
true);
Lamp_SetLit("ceiling_large_robot_1",
true,
true);
Lamp_SetLit("ceiling_large_robot_4",
true,
true);

}
else
{
Lamp_SetLit("ceiling_large_robot_3",
false,
true);
Lamp_SetLit("ceiling_large_robot_2",
false,
true);
Lamp_SetLit("ceiling_large_robot_1",
false,
true);
Lamp_SetLit("ceiling_large_robot_4",
false,
true);



}
return true;
}

I get this error : Can't return value when return type is void.
Anyone knows what this means? Or see anything wrong with my script? :S

Edit: Also, another error: could not find method void button_glow_moving_1...

Edit 2: Nevermind, got it solved!
(This post was last modified: 07-10-2016, 01:32 PM by Venom Fox.)
07-10-2016, 11:54 AM
Find Reply
Venom Fox Offline
Junior Member

Posts: 32
Threads: 9
Joined: Mar 2016
Reputation: 0
#22
RE: Script error (Again)

What I'd like to know is that why whenever I add a function, I get this error :

error : Could not find method 'void [my func's name here] in object '01_office_area_1'

anyone familiar with this error? Happens literally every single time I try to add a function..
07-10-2016, 01:57 PM
Find Reply




Users browsing this thread: 1 Guest(s)