Forum Discussion
Text entry must contain
Steven,
These lines won't work, because the second one changes what the first one did, so the lower case is never searched for.
var n = str.search("drain");
var n = str.search("Drain");
The attempt with two separate variables probably works, but these lines change the SL variable to the upper case regardless of which one is found.
player.SetVar("draincoolant", "Drain coolant");
}else if(m >= 0){
player.SetVar("draincoolant", "Drain coolant");
}else{
Try var str = player.GetVar("draincoolant").toLowerCase(); if you want to ignore case. The problem is that the answer is changed to all lower case, which is only a problem if you come back at the end and reset the SL variable. In that case, I would use strOri to store the original value, then use str = strOri.toLowerCase(); Search str, and use strOri to write to SL.
Related Content
- 7 months ago
- 1 year ago