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.)
|