Frictional Games Forum (read-only)
SetLampLit HELP! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: SetLampLit HELP! (/thread-7213.html)



SetLampLit HELP! - Itskody - 04-06-2011

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", 10, 20, ""); 
    
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
    
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", 10, 20, ""); 
        
SetLampLit("candle_floor_1", false, "");
    }
    else if(
asTimer == "3"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_2", 10, 20, "");
        
SetMessage("Messages", "???", 3.0f);
        
SetLampLit("candle_floor_2", false, "");
    }
    else if(
asTimer == "4"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_3", 10, 20, "");
        
PlayGuiSound("react_breath_slow", 0.7f);
        
SetLampLit("candle_floor_3", false, "");
    }
    else if(
asTimer == "5"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candle_floor_4", 10, 20, "");
        
SetLampLit("candle_floor_4", false, "");
    }
    else if(
asTimer == "6"){
        
StopPlayerLookAt();
        
StartPlayerLookAt("candlestick_floor_red_2", 10, 20, "");
        
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.


RE: SetLampLit HELP! - Pandemoneus - 04-06-2011

Because the signature is
void SetLampLit(string& asName, bool abLit, bool abEffects);
but you got
string&, bool, string&


RE: SetLampLit HELP! - Streetboat - 04-07-2011

yeah basically just change the "" at the end of your SetLampLit lines to say false. No quotes.