![]()  | 
CRegistry:SetBool
The SetBool method saves a Boolean (logical) value to a Registry key. The value being saved must evaluate to true or false.
| 
 CRegistry:SetBool( sName, bValue ) 
 
  | 
The following script opens a key specified by sKeyName and saves 3 Boolean values to the Registry under the names "MyVal 1":. "MyVal 2", and "MyVal 3".
| 
 R = CRegistry:Open( sKeyName )  | 
 -- open the key and create a CRegistry object  | 
| 
 R:SetNum( "MyVal 1", true )  | 
 -- saves the value true under the name "MyVal 1"  | 
| 
 R:SetNum( "MyVal 2", 25 )  | 
 -- saves the value true  | 
| 
 R:SetNum( "MyVal 3", a == 4 )  | 
 -- saves true only if a equals 4  |