What is wrong with this script?

Ok, I am working on this for hours but it wont work its a script to create A debugline between to objects on a advanced way (So far). But its not working… No errors.

This is my script:

class RayColors extends System.Object {
	var geel : boolean = false;
	var groen: boolean = false; 
	var rood: boolean = false; 
	var blauw : boolean = false; 
}

class Rays extends System.Object {
	var SWP : Transform;
	var Activate : boolean = false;
	var RayColors = RayColors ();
}

var rays : Rays[];
var player : Transform;

var first : boolean = false;

function Start () {

}

function Update () {

	if(rays[0].Activate == true)
	{
			if(rays[0].RayColors.geel == true)
			{
			Debug.DrawLine(transform.position, rays[0].SWP.transform.position, Color.yellow);
			
		    	if(rays[0].RayColors.groen || rays[0].RayColors.rood || rays[0].RayColors.blauw)
				{
				Debug.LogError("Make sure 1 color is activated!");
				}
			}		
	}
}

try this:

#pragma strict

 class RayColors extends System.Object {
     var geel : boolean = false;
     var groen: boolean = false; 
     var rood: boolean = false; 
     var blauw : boolean = false; 
 }
 
 class Rays extends System.Object {
     var SWP : Transform;
     var Activate : boolean = false;
     var RayColors = RayColors ();
 }
 
 var rays : Rays[];
 var player : Transform;
 
 var first : boolean = false;
 
 function Start () {

 }
 
 function Update () {
 
     if(rays[0].Activate == true)
     {
             if(rays[0].RayColors.geel == true)
             {
             Debug.DrawLine(transform.position, rays[0].SWP.transform.position, Color.Yellow);
            
                 if(rays[0].RayColors.groen || rays[0].RayColors.rood || rays[0].RayColors.blauw);
                 {
                 Debug.LogError("Make sure 1 color is activated!");
                 }
             }        
     }
 }
  1. When posting question, post the error too.
  2. It’s Color.yellow not Color.Yellow
  3. Be sure you defined Rays array size from inspector, at least in length of 1