Frictional Games Forum (read-only)

Full Version: SetLampLit HELP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
alright so when i try to load my map, it crashes and says that ALL of my SetLampLit didnt have matching signatures, this is my script
PHP Code:
void LightsOut(string &in entity)
{
    
SetLampLit("candlestick_floor_red_1"false"");
    
StartPlayerLookAt("candlestick_floor_red_1"1020""); 
    
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);
    
AddTimer("1"0.5f"NoLights");
    
AddTimer("2"1.0f"NoLights");
    
AddTimer("3"1.5f"NoLights");
    
AddTimer("4"2.0f"NoLights");
    
AddTimer("5"2.5f"NoLights");
    
AddTimer("6"3.0f"NoLights");
    
AddTimer("7"3.5f"NoLights");
}

void NoLights(string &in asTimer)
{
    if(
asTimer == "1"){
        
PlayGuiSound("player_cough.snt"0.7f);
        
StopPlayerLookAt();
    }
    else if(
asTimer == "2"){
        
StartPlayerLookAt("candle_floor_1"1020""); 
        
SetLampLit("candle_floor_1"false"");
    }
    else if(
asTimer == "3"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_2"1020"");
        
SetMessage("Messages""???"3.0f);
        
SetLampLit("candle_floor_2"false"");
    }
    else if(
asTimer == "4"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_3"1020"");
        
PlayGuiSound("react_breath_slow"0.7f);
        
SetLampLit("candle_floor_3"false"");
    }
    else if(
asTimer == "5"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_4"1020"");
        
SetLampLit("candle_floor_4"false"");
    }
    else if(
asTimer == "6"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candlestick_floor_red_2"1020"");
        
SetLampLit("candlestick_floor_red_2"false"");
    }
    else if(
asTimer == "7"){
        
StopPlayerLookAt();
    }

What is wrong with the SetLampLit. i dont know what to change to make it work, or what i did wrong.
Because the signature is
void SetLampLit(string& asName, bool abLit, bool abEffects);
but you got
string&, bool, string&
yeah basically just change the "" at the end of your SetLampLit lines to say false. No quotes.